Skip to content

dmypy does not work right with disable_error_code/enable_error_code #14241

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

Open
uf-fipper opened this issue Dec 3, 2022 · 6 comments
Open

dmypy does not work right with disable_error_code/enable_error_code #14241

uf-fipper opened this issue Dec 3, 2022 · 6 comments
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 support disable_error_code and enable_error_code key in pyproject.toml/mypy.ini?

in pyproject.toml:

# pyproject.toml
[tool.mypy]
disable_error_code = ['var-annotated']

run: dmypy run a.py
output: Timed out waiting for daemon to start

But when disable_error_code = [] or doesn't has disable_error_code, dmypy work right.

Your Environment

  • Mypy version used: 0.981, 0.991
  • Mypy command-line flags: dmypy run a/a.py
  • Mypy configuration options from pyproject.toml: disable_error_code = ['var-annotated']
  • Python version used: 3.11
@uf-fipper uf-fipper added the bug mypy got something wrong label Dec 3, 2022
@AlexWaygood AlexWaygood added topic-daemon dmypy topic-configuration Configuration files and flags labels Dec 3, 2022
@uf-fipper uf-fipper changed the title dmypy does not work right with dmypy does not work right with disable_error_code/enable_error_code Dec 3, 2022
@ilevkivskyi
Copy link
Member

Hm, I cannot reproduce this, I get

(mypy_dev_3_11) ivan@x333:~/src/random_tests/tstconf$ dmypy run a.py
Daemon started
Success: no issues found in 44 source files
(mypy_dev_3_11) ivan@x333:~/src/random_tests/tstconf$ cat pyproject.toml 
[tool.mypy]
disable_error_code = ['var-annotated']

(mypy_dev_3_11) ivan@x333:~/src/random_tests/tstconf$ cat a.py
x = []
(mypy_dev_3_11) ivan@x333:~/src/random_tests/tstconf$ dmypy --version
dmypy 0.991

@ilevkivskyi
Copy link
Member

Btw you can try using --log-file FILE to debug this. Daemon may log something useful there. Also btw are you on Windows?

@uf-fipper
Copy link
Author

image
image
after I run dmypy run a.py --log-file log.txt, I get Timed out waiting for daemon to start and no file create.

@uf-fipper
Copy link
Author

I run the command on win11

@ilevkivskyi
Copy link
Member

For something Windows-specific @ethanhs can help.

@emmatyping
Copy link
Member

I could reproduce this on Windows, but when I try multiple times it does not happen again, I wonder if this is a non-deterministic bug...

I'll try to dig into more this weekend.

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