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
> mypy -m src.test
src/test.py:4: note: Revealed type is "builtins.int"
Success: no issues found in 1 source file
> mypy src/test
src/test.py:4: note: Revealed type is "builtins.int"
Success: no issues found in 1 source file
Mypy is designed to doggedly follow all imports, even if the imported module is not a file you explicitly wanted mypy to check.
--follow-imports=normal follows all imports normally and type checks all top level code (as well as the bodies of all functions and methods with at least one type annotation in the signature).
> mypy src/test.py
src/test2.py:1: error: Unsupported operand types for + ("int" and "str") [operator]
src/test.py:4: note: Revealed type is "builtins.int"
Found 1 error in 1 file (checked 3 source files)
type checks all code
where are the errors from this typechecking?
i found them
> mypy --no-silence-site-packages -m src.test
src/test2.py:1: error: Unsupported operand types for + ("int" and "str") [operator]
src/test.py:4: note: Revealed type is "builtins.int"
uhhhh, what?
Enables reporting error messages generated within installed packages (see PEP 561 for more details on distributing type information). Those error messages are suppressed by default, since you are usually not able to control errors in 3rd party code.
> mypy -m src.test
src/test.py:4: note: Revealed type is "builtins.int"
Success: no issues found in 1 source file
> uv pip uninstall -e .
...
> mypy -m src.test
src/test2.py:1: error: Unsupported operand types for + ("int" and "str") [operator]
src/test.py:4: note: Revealed type is "builtins.int"
Found 1 error in 1 file (checked 1 source file)
The text was updated successfully, but these errors were encountered:
KotlinIsland
changed the title
(🐞) errors from imported modules aren't reported when project is isntalled
(🐞) errors from imported modules aren't reported when project is installed
Nov 5, 2024
given
then
expected
reference
where are the errors from this typechecking?
i found them
uhhhh, what?
The text was updated successfully, but these errors were encountered: