-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add type hints for checking by mypy #355
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! I have a few questions / suggested tweaks, and it looks like the black
lint isn't passing (mainly Black wanting double quotes in places).
The unpaddedbase64 requirement in setup.py
can be updated to >=1.1.0
to pull in a version which supplies type hints, avoiding the need for some type: ignore
lines (best done in a followup pull request to ease review)
Generally, type: ignore
lines are probably better replaced with a mypy.ini
config file and set like:
[mypy-signedjson]
ignore_missing_imports = True
[mypy-unpaddedbase64]
ignore_missing_imports = True
Which has the same effect, but without all the individual annotations
This last commit should take care of the requested changes on this branch that aren't going to be moved to a separate PR. Thanks again for reviewing! |
Looks like flake8 in CI isn't totally happy yet, otherwise this is good to go once these are fixed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woohoo! This is an awesome step toward more confidence in refactoring Sydent. Thank you!
Signed-off-by: H.Shay <shaysquared@gmail.com>
… change was moved to another PR. This reverts commit e618512.
per this: #355 (comment) Signed-off-by: H.Shay <shaysquared@gmail.com>
Here is the first round of adding support for mypy. A few things:
signed off by H-Shay: shaysquared@gmail.com