user_pin and so_pin in Token.open() are documented as bytes, instead they are str
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 65/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- python
- Domain
- documentation
Research direction
Start at the Token.open() docstring and compare the documented types for user_pin and so_pin with the encode calls shown in the issue. Update the parameter documentation to match the string values accepted by the implementation, then run the relevant existing tests or documentation checks; done means type-checking tools no longer report this mismatch.
Written by the indexing model from the issue text.
Description
In the docstring of the Token open function user_pin and so_pin are documented as bytes, but the code assumes they are strings:
elif user_pin is not None:
pin = user_pin.encode('utf-8')
c_user_type = user_type if user_type is not None else CKU_USER
elif so_pin is not None:
pin = so_pin.encode('utf-8')
c_user_type = CKU_SO
This causes pycharm (and other type checking tools) to complain
- Dominant language
- Python
- Stars
- 170
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pyauth/python-pkcs11
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
pyauth/python-pkcs11#233 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
pyauth/python-pkcs11#228 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
pyauth/python-pkcs11#220 · 1 comment ·
-
readthedocs.io setup Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
pyauth/python-pkcs11#211 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
pyauth/python-pkcs11#192 · 2 comments ·
All issues in pyauth/python-pkcs11
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100