Closed DMRobertson closed 2 years ago
Huge thanks for working through this big project with me. I think this is the last thing I would consider a blocker for the next pynacl release, so now it's just some housekeeping and getting a release out the door in the next few days/weeks.
Huge thanks for working through this big project with me.
My pleasure---thanks for reviewing!
Draft for now while CI runs.I started by adding annotations to
tests.utils
like I did the rest of the project, using the same strict config as before. Then I took a few modules and ran mypy on them, and dealt with any unexpected complaints reported by mypy. Then I suppressed the uninteresting errors in mypy config.Its complaints so far:
disallow_untyped_defs
being unhappy that we haven't marked test function as-> None
. There are some parameterised tests though, and I found it useful to add in annotations here to ensure the test body was doing something sensible.-> None
Any
. Not interesting; ignored in config.crypto_scalarmult_BYTES
andSCALARBYTES
were untyped, see 10434eb. Easy to fix.crypto_box
with a stringnonce
. I'm a bit surprised this worked, to be honest. I guess the fact that the nonce was ascii-encodable (i.e. just nulls) might have helped?I didn't feel like annotating
check_type_error
three times, so I pulled it out totests.utils
. It's a bit naughty to do so in this PR (could spin it out?) and I felt a bit icky makingutils
pull inpytest
.