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
{{ message }}
Repository navigation
Line number missing from "note" message when running with cache #20017
When running with cached results, Mypy does not display the line number in "note" messages. When running with no cached results (or an empty cache), the line number is correctly present inside the message.
rm -rf .mypy_cache
python -m mypy example.py # First run (no cache)
python -m mypy example.py # Second run (with cache)
Expected Behavior (without cache)
Output of Mypy is:
example.py:3: error: Unexpected keyword argument "inexistent_arg" for "foo" [call-arg]
example_stubs.pyi:1: note: "foo" defined here
Found 1 error in 1 file (checked 1 source file)
Actual Behavior (with cache)
When the Mypy cache is present, the output of Mypy is:
example.py:3: error: Unexpected keyword argument "inexistent_arg" for "foo" [call-arg]
example_stubs.pyi: note: "foo" defined here
Found 1 error in 1 file (checked 1 source file)
Note the missing line number (1) just after example_stubes.pyi: and before note: "foo" defined here inside the middle line of the output.
Your Environment
Mypy version used: 1.18.2
Mypy command-line flags: (none)
Mypy configuration options from mypy.ini (and other config files): (none)
Activity