user_pin and so_pin in Token.open() are documented as bytes, instead they are str
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 170
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
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
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.
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.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100