-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Exclude not working properly for version 0.931 #11936
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
Comments
Unfortunately, the changes 0.930 made to Here's what you can do to make things work: mypy.ini
pyproject.toml
pyproject.toml (if you love regexes)
See https://mypy.readthedocs.io/en/latest/config_file.html#confval-exclude for details |
Great! This works! Thanks a lot! |
* Catch None if checkType, and use checkNullableType to accept None, closes #76 * Remove explicit type check for ascending * Implement BaseRandomSplit and RandomRatioPartition * Implement RandomRatioHoldout, closes #67 Did not implement cross validation, could be simply passed the sklearn skf.split * Move mypy config into setup.cfg * Fix mypy version * Update mypy config, see python/mypy#11936
Hi @hauntsaninja # Global options:
[mypy]
namespace_packages = True
; explicit_package_bases = True
follow_imports = normal
show_column_numbers = True
warn_unused_configs = True
plugins = pydantic.mypy
exclude = (?x)(
src/helpers/protobuf_generated/
) However, mypy is still returning some errors for files inside
|
Likely this, from the docs: https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-exclude
|
Ah yes thanks, I added the follwing to the config and it now doesn't report the errors anymore. [mypy-src.helpers.protobuf_generated.*]
follow_imports = skip |
(cross-linking to #10377 to help issue and discussion discoverability) |
In my current setup, I use tox (version 3.24.5) to run mypy for type checking my codebase. I specified a few files to be excluded from the checks in the
setup.cfg
file. Previously (mypy version 0.930) it works fine, but after updating mypy to version 0.931, it does not seem to properly exclude the files when called via tox.The error
Below is the error message by running
tox -e mypy
, where it raises error due to files that I've excluded:src/NLEval/valsplit/
,src/NLEval/model/
and/src/NLEval/graph/
.Previous version (0.930) works fine
If I set the mypy version to 0.930 (the previous version), it runs fine:
Command-line interface works fine
However, if I run using the command line interface, it properly excludes the files.
Configuration
Here's the relevant lines in my
setup.cfg
for setting up mypy configuration:[mypy] ignore_missing_imports = true follow_imports = skip exclude = src/NLEval/graph/ src/NLEval/valsplit/ src/NLEval/metrics.py
The text was updated successfully, but these errors were encountered: