You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having an issue with exclude. Basically, I exclude my tests/fixtures folder because it contains code with syntax that is only supported by Python 3.8, 3.9, etc, while my project supports Python 3.7. So the files in tests/fixtures contain invalid syntax on Python 3.7.
When I run mypy on Python 3.7, it errors with this:
tests/fixtures/validation_38.py:1: error: invalid syntax [syntax]
Found 1 error in 1 file (errors prevented further checking)
I exclude the folder with exclude = tests/fixtures in mypy.ini.
I tried excluding the file name directly, for example with exclude = validation_38\.py but it still fails the same way.
Bug Report
I'm having an issue with exclude. Basically, I exclude my
tests/fixtures
folder because it contains code with syntax that is only supported by Python 3.8, 3.9, etc, while my project supports Python 3.7. So the files intests/fixtures
contain invalid syntax on Python 3.7.When I run mypy on Python 3.7, it errors with this:
I exclude the folder with
exclude = tests/fixtures
inmypy.ini
.I tried excluding the file name directly, for example with
exclude = validation_38\.py
but it still fails the same way.To Reproduce
Checking only the parent folder, I'm able to exclude it:
Any other way fails:
Expected Behavior
Invalid syntax errors should be ignored if the file in question is excluded.
It seemed to work previously (before 1.0.0?).
Actual Behavior
An excluded file with invalid syntax makes mypy terminate with an error.
Your Environment
mypy.ini
(not used in the examples above):Possibly related to #9981 and #6897.
The text was updated successfully, but these errors were encountered: