Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(🐞) dmypy doesn't report any errors when passed an absolute file if the project is installed with a .pth file #18117

Open
KotlinIsland opened this issue Nov 7, 2024 · 0 comments
Labels
bug mypy got something wrong

Comments

@KotlinIsland
Copy link
Contributor

KotlinIsland commented Nov 7, 2024

given

- test/
|-src/__init__.py
|-pyproject.toml
[project]
name = "test"
version = "1"
requires-python = ">=3.13, <3.14"
build-backend = "hatchling.build"
dependencies = [
    "mypy>=1.13.0",
]

[build-system]
requires = ["hatchling==1.25.0"]
build-backend = "hatchling.build"
> uv sync
...
> echo a > test.py
> dmypy run test.py
Daemon started
test.py:1: error: Name "a" is not defined  [name-defined]
Found 1 error in 1 file (checked 1 source file)
> echo b > test.py
> dmypy run absolute/path/to/test.py
Success: no issues found in 1 source file
@KotlinIsland KotlinIsland added the bug mypy got something wrong label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

No branches or pull requests

1 participant