Skip to content
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

[type checking] add mypy to CI, resolve all current mypy errors #312

Merged
merged 5 commits into from
Apr 27, 2019

Conversation

redshiftzero
Copy link
Contributor

Towards #25. This PR:

  • Gets mypy running in CI and in dev
  • Resolves all mypy errors

Makefile Show resolved Hide resolved
securedrop_client/gui/main.py Outdated Show resolved Hide resolved
securedrop_client/gui/widgets.py Outdated Show resolved Hide resolved
securedrop_client/logic.py Outdated Show resolved Hide resolved
tests/conftest.py Outdated Show resolved Hide resolved
@redshiftzero
Copy link
Contributor Author

this one is ready for another peek @heartsucker or @creviera

@sssoleileraaa
Copy link
Contributor

this lgtm, looking forward to the change

* ignore missing imports

https://mypy.readthedocs.io/en/latest/running_mypy.html#ignore-missing-imports

* mypy doesn't handle dynamic base classes

see workaround in python/mypy#2477

* rework language_code handling to resolve TypeError

mypy was flagging this logic due to the fact that current_locale
is Optional[str]

* TimedRotatingFileHandler delay arg should be bool
@redshiftzero redshiftzero merged commit 0e47739 into master Apr 27, 2019
SecureDrop Team Board automation moved this from In Development to Done Apr 27, 2019
@redshiftzero redshiftzero deleted the type-checking branch April 27, 2019 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants