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 working when ignore_missing_imports in [tool.mypy] session #14272

Open
uf-fipper opened this issue Dec 10, 2022 · 3 comments
Open
Labels
bug mypy got something wrong topic-configuration Configuration files and flags topic-daemon dmypy

Comments

@uf-fipper
Copy link

Bug Report

dmypy doesn't working when ignore_missing_imports in [tool.mypy] session.
I run the command on win11.

To Reproduce

pyproject.toml

[tool.mypy]
ignore_missing_imports = true

dmypy run a.py

Restarting: configuration changed
Daemon stopped
Daemon started
Response: {'restart': 'configuration changed', 'platform': 'win32', 'python_version': '3_9', 'roundtrip_time': 0.47419118881225586}

pyproject.toml

[[tool.mypy.overrides]]
module = ["apscheduler"]
ignore_missing_imports = true

dmypy run a.py

Success: no issues found in 1 source file

Your Environment

  • Mypy version used: 0.991
  • Mypy command-line flags: dmypy run a.py
  • Mypy configuration options from pyproject.toml:
[tool.mypy]
ignore_missing_imports = true
  • Python version used: 3.9
  • os: win11
@uf-fipper uf-fipper added the bug mypy got something wrong label Dec 10, 2022
@ethanhs
Copy link
Collaborator

ethanhs commented Dec 10, 2022

Probably the same issue as #14241

@jbaudisch
Copy link

I got the same issue when using VSCode's Mypy Type Checker. Having ignore_missing_imports = true in my pyproject.toml leads to a non-working extension (in terms of not showing any errors). If I comment this out, dmypy does work again (errors are shown again). Don't know if this issue still exist or if it is a problem in the extension. But if I switch to mypy instead of dmypy in the extension, it works - so I think the problem is here.

@uf-fipper
Copy link
Author

I got the same issue when using VSCode's Mypy Type Checker. Having ignore_missing_imports = true in my pyproject.toml leads to a non-working extension (in terms of not showing any errors). If I comment this out, dmypy does work again (errors are shown again). Don't know if this issue still exist or if it is a problem in the extension. But if I switch to mypy instead of dmypy in the extension, it works - so I think the problem is here.

At that time, I used command line to reproduce the bug, but now I can't reproduce it... dmypy can run successfully on both vscode and command line.
This is a similar issue: #14241

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong topic-configuration Configuration files and flags topic-daemon dmypy
Projects
None yet
Development

No branches or pull requests

4 participants