-
Notifications
You must be signed in to change notification settings - Fork 192
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 minimal 'mypy' run to the pre-commit hooks. #4176
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Global options | ||
|
||
[mypy] | ||
python_version = 3.5 | ||
|
||
follow_imports = skip | ||
|
||
; Strictness settings | ||
; disallow_any_unimported = True | ||
; disallow_any_expr = True | ||
; disallow_any_decorated = True | ||
; disallow_any_explicit = True | ||
; disallow_any_generics = True | ||
; disallow_subclassing_any = True | ||
|
||
; disallow_untyped_calls = True | ||
; disallow_untyped_defs = True | ||
; disallow_incomplete_defs = True | ||
; disallow_untyped_decorators = True | ||
|
||
; no_implicit_optional = True | ||
; no_strict_optional = False | ||
|
||
; Enable all warnings | ||
; warn_redundant_casts = True | ||
; warn_unused_ignores = True | ||
; warn_return_any = True | ||
; warn_unreachable = True | ||
|
||
; allow_untyped_globals = False | ||
; strict_equality = True | ||
|
||
[mypy-numpy.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-plumpy.*] | ||
ignore_missing_imports = True | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this similar to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mypy.. has its own "import system" - the problem here is that when dependencies don't have type annotations, that will be reported as a failure. For now I'm not sure this makes a difference since we also use The import mechanism is described here: https://mypy.readthedocs.io/en/stable/running_mypy.html#how-mypy-handles-imports |
||
|
||
[mypy-scipy.*] | ||
ignore_missing_imports = True | ||
|
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.
can we get rid of all these if we are not using them?
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.
Yeah, although it might be nice seeing them listed here since (I think) the goal would be to slowly enable some of them.