-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Type annotations for
nacl.utils
(#697)
* Type annotations for `nacl.utils` This applies the changes proposed in #692 to `nacl.utils` on top of the changes in more recent PRs. I've annotated `nacl.bindings.randombytes_buf_deterministic` to appease mypy. It's needed because I configured mypy to require that typed code always calls typed functions, in #694. Per #692 (comment) and https://stackoverflow.com/a/44644576/5252017 , I've made sure that the `_from_parts` accepts a generic `cls` argument and returns an instance of that `cls`. I don't think we actually intend for people to subclass `EncryptedMessage`, but maybe they do. Besides, it's nice to have annotations that are as accurate as possible. * Use `_EncryptedMessage` in place of `C` * Run black to appease linter
- Loading branch information
1 parent
c2ddf9f
commit 54a5ee2
Showing
3 changed files
with
21 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters