-
-
Notifications
You must be signed in to change notification settings - Fork 407
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 mypy and typing_copilot checks to the CI pipeline. #1528
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0362e7e
Add a passing mypy.ini generated by typing_copilot.
obi1kenobi 9dc540a
Merge branch 'main' into add_mypy_ini
obi1kenobi 60231dc
Merge branch 'main' into add_mypy_ini
obi1kenobi 910e735
Add a working mypy.ini file with mypy<0.800.
obi1kenobi 36a8b4f
Add CI pipeline steps for mypy and typing_copilot checks.
obi1kenobi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,285 @@ | ||
|
||
# Autogenerated by typing_copilot v0.5.4 | ||
[mypy] | ||
no_implicit_optional = True | ||
strict_optional = True | ||
warn_redundant_casts = True | ||
check_untyped_defs = True | ||
disallow_untyped_calls = True | ||
disallow_incomplete_defs = True | ||
disallow_untyped_defs = True | ||
disallow_untyped_decorators = True | ||
ignore_missing_imports = False | ||
warn_unused_ignores = True | ||
|
||
|
||
# First party per-module rule relaxations | ||
[mypy-arviz.*] | ||
disallow_untyped_calls = False | ||
disallow_untyped_defs = False | ||
|
||
[mypy-arviz.data.datasets.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.data.inference_data.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.data.io_cmdstan.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.data.io_cmdstanpy.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.data.io_dict.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.data.io_emcee.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.data.io_json.*] | ||
check_untyped_defs = False | ||
|
||
[mypy-arviz.data.io_numpyro.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.data.io_pyjags.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.data.io_pymc3.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.data.io_pyro.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.data.io_pystan.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.data.io_tfp.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.labels.*] | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.plots.backends.*] | ||
check_untyped_defs = False | ||
|
||
[mypy-arviz.plots.backends.bokeh.*] | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.plots.backends.matplotlib.forestplot.*] | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.plots.backends.matplotlib.posteriorplot.*] | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.plots.backends.matplotlib.ppcplot.*] | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.plots.densityplot.*] | ||
check_untyped_defs = False | ||
|
||
[mypy-arviz.plots.elpdplot.*] | ||
check_untyped_defs = False | ||
|
||
[mypy-arviz.plots.pairplot.*] | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.plots.separationplot.*] | ||
check_untyped_defs = False | ||
|
||
[mypy-arviz.plots.traceplot.*] | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.rcparams.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.sel_utils.*] | ||
check_untyped_defs = False | ||
|
||
[mypy-arviz.stats.density_utils.*] | ||
check_untyped_defs = False | ||
|
||
[mypy-arviz.stats.diagnostics.*] | ||
check_untyped_defs = False | ||
|
||
[mypy-arviz.stats.stats.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.stats.stats_utils.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.base_tests.test_data.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.base_tests.test_diagnostics.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.base_tests.test_diagnostics_numba.*] | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.base_tests.test_plot_utils.*] | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.base_tests.test_plots_bokeh.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.base_tests.test_plots_matplotlib.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.base_tests.test_rcparams.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.base_tests.test_stats.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.base_tests.test_stats_numba.*] | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.base_tests.test_stats_utils.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.base_tests.test_utils.*] | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.base_tests.test_utils_numba.*] | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.conftest.*] | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.external_tests.test_data_cmdstan.*] | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.external_tests.test_data_cmdstanpy.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.external_tests.test_data_emcee.*] | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.external_tests.test_data_numpyro.*] | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.external_tests.test_data_pyjags.*] | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.external_tests.test_data_pymc.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.external_tests.test_data_pyro.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.external_tests.test_data_pystan.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.tests.helpers.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-arviz.utils.*] | ||
check_untyped_defs = False | ||
disallow_incomplete_defs = False | ||
|
||
[mypy-setup.*] | ||
disallow_incomplete_defs = False | ||
disallow_untyped_calls = False | ||
disallow_untyped_defs = False | ||
|
||
|
||
# Third-party module rule relaxations | ||
[mypy-IPython.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-aesara.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-bokeh.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-cmdstanpy.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-emcee.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-jax.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-matplotlib.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-mpl_toolkits.axes_grid1.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-netCDF4.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-numba.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-numpy.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-numpyro.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-pandas.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-pyjags.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-pymc3.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-pyro.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-pystan.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-scipy.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-setuptools.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-stan.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-tensorflow.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-tensorflow_probability.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-theano.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-zarr.*] | ||
ignore_missing_imports = True |
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 |
---|---|---|
|
@@ -5,3 +5,5 @@ pylint | |
pytest | ||
pytest-cov | ||
black ; python_version >= '3.6' | ||
typing_copilot ; python_version >= '3.7' | ||
mypy<0.800 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
would it help with anything/is it possible to run mypy only on main arviz and example folders?
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.
Unfortunately, not at the moment.
typing_copilot
doesn't yet have the capability to run mypy with custom flags, so even if you made this command different, thetyping_copilot
step would still essentially runmypy .
and still fail.Hoping to fix this in a future version of
typing_copilot
since this is obviously going to be painful for many use cases.