forked from has2k1/plotnine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add minimal typecheck infrastructure to CI (has2k1#644)
* add mypy.ini, but ignore errors at first * type hint labels * type hint options, exceptions Also fix an import error in options. It attempted a relative import beyond the top level package. * Add typecheck job to CI * resolve feedback
- Loading branch information
1 parent
b120af2
commit 0724b8e
Showing
6 changed files
with
107 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Mypy configuration file | ||
# See docs: https://mypy.readthedocs.io/en/stable/config_file.html | ||
[mypy] | ||
|
||
# Specifies the Python version used to parse and check the target program. | ||
# We're using the oldest supported python version. Mypy will warn us if we use | ||
# features or parts of the stdlib that are too new. | ||
python_version = 3.8 | ||
|
||
# Set some rather strict defaults, but also globally deactivate all errors | ||
# and then activate the typecheck only for certain modules. | ||
# The set of typechcecked modules can be incrementally expanded until everything | ||
# is correctly typed. | ||
|
||
# Shows a warning when returning a value with type Any from a function declared with a non- Any return type. | ||
warn_return_any = True | ||
|
||
# Warns about per-module sections in the config file that do not match any files processed when invoking mypy. | ||
# Has no effect in incremental mode | ||
warn_unused_configs = True | ||
|
||
# Disallows defining functions without type annotations or with incomplete type annotations. | ||
# Once a module is fully typed, this should be activated to avoid regressions. | ||
disallow_untyped_defs = True | ||
|
||
# Disallows usage of generic types that do not specify explicit type parameters. | ||
disallow_any_generics = True | ||
|
||
# Allows variables to be redefined with an arbitrary type, as long as the redefinition is in the same block and nesting level as the original definition. | ||
# The original variable must have been used before redefinition. | ||
allow_redefinition = True | ||
|
||
# Shows a warning when encountering any code inferred to be unreachable or redundant after performing type analysis. | ||
warn_unreachable = True | ||
|
||
# Ignores all non-fatal errors. | ||
ignore_errors = True | ||
|
||
# per module options | ||
[mypy-plotnine.labels] | ||
ignore_errors = False | ||
|
||
[mypy-plotnine.options] | ||
ignore_errors = False | ||
|
||
[mypy-plotnine.exceptions] | ||
ignore_errors = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters