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
Bug Report
mypy seems to be ignoring at least some errors when called on a file using an absolute address. I had originally presumed this was an issue with my project but it's very easy for me to reproduce on a basic setup. If you have reason to believe this an issue with my machine setup, I would love to know - I'm currently unable to use mypy linting in vscode due to this issue.
$ .venv/bin/mypy --strict /home/mike/Documents/deleteMe/pipenv_testing/sample.py
Success: no issues found in 1 source file
$ .venv/bin/mypy --strict ./sample.py
sample.py:4: error: Function is missing a type annotation [no-untyped-def]
Found 1 error in 1 file (checked 1 source file)
To Reproduce
Generate a file containing one or more simple mypy errors, example below (error only occurs with strict set on):
Install mypy (I'm using pipenv to generate a virtualenv using pipenv install mypy)
Run mypy against a relative path to the simple python file generated above in a configuration that expects an error and verify the error is displayed correctly. For example: .venv/bin/mypy --strict ./sample.py
Repeat step 3 but use an absolute path to the target python file and observe that no issues are reported. For example: .venv/bin/mypy --strict /home/mike/Documents/deleteMe/pipenv_testing/sample.py
Expected Behavior
It's expected that both conditions should yield identical error results rather than the absolute path call yielding no issues/errors.
Your Environment
Mypy version: mypy 0.990 (compiled: yes)
Python version: Python 3.9.15
Mypy command-line flags: '--strict'
No form of mypy configuration file used anywhere (though I also performed the same tests with a project containing a config file that I specified with an absolute file path using the '--config-file' arg and got the same results).
The text was updated successfully, but these errors were encountered:
Bug Report
mypy seems to be ignoring at least some errors when called on a file using an absolute address. I had originally presumed this was an issue with my project but it's very easy for me to reproduce on a basic setup. If you have reason to believe this an issue with my machine setup, I would love to know - I'm currently unable to use mypy linting in vscode due to this issue.
To Reproduce
pipenv install mypy
).venv/bin/mypy --strict ./sample.py
.venv/bin/mypy --strict /home/mike/Documents/deleteMe/pipenv_testing/sample.py
Expected Behavior
It's expected that both conditions should yield identical error results rather than the absolute path call yielding no issues/errors.
Your Environment
The text was updated successfully, but these errors were encountered: