-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
Description
Bug Report
When using exclude-gitignore option then mypy ignores additional ignore rules added to .git/info/exclude
To Reproduce
mkdir test-prj
cd test-prj
git init
echo '*' >> .git/info/exclude
echo 'invalid code' > main.py
mypy --exclude-gitignore .Expected Behavior
Mypy should respond with
There are no .py[i] files in directory '.'
as all files are excluded.
Actual Behavior
Mypy tries to read main.py
main.py:1: error: Invalid syntax [syntax]
Found 1 error in 1 file (errors prevented further checking)
Your Environment
- Mypy version used: 1.19.1
- Mypy command-line flags: exclude-gitignore
- Mypy configuration options from
mypy.ini(and other config files): none - Python version used: 3.14.3
Reactions are currently unavailable