pyauth / pyotp

Python One-Time Password Library
https://pyauth.github.io/pyotp/
Other
2.95k stars 321 forks source link

Adds typing, forgoes Python2 compatiblity #89

Closed jbwdevries closed 4 years ago

jbwdevries commented 4 years ago

mypy is type checking for Python - it can run type analysis on your code and help fix bugs. Projects that use type checking on their code and want to make use of pyotp are helped by pyotp having type hints, so they can catch errors in their code.

While it is possible to do type hinting with Python2, since 2020 is the year of Python2's demise, I added type hinting Python3 style, since that is so much more readable. I also removed all Python2 compatibility code.

I also added some more tests for parse_uri, coverage should now be at 100%.

Also various cleanup to the repo (Makefile etc).

jbwdevries commented 4 years ago

I pushed a second which fixes some packaging issues (forgot to include py.typed)

jbwdevries commented 4 years ago

I've updated the PR with the removal of the flag file.