-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 run
won't run, prints "Restarting: configuration changed"
when ignore_missing_imports = True
is configured
#10709
Comments
I guess it has something to do with these changes: 4642a31#diff-eb09ce67c2059bc9c117d4175e0bd34b1d75bbe8a91c3b9f69a8d14a9c8bc09fR330 |
A workaround, for now, is to use this undocumented option together: ignore_missing_imports_per_module = True as in: [mypy]
files = src
ignore_missing_imports = True
ignore_missing_imports_per_module = True |
I can't reproduce this issue, at least on macOS and Python 3.9.0. Can you provide an example file under |
I was trying it in a fresh venv, the source was just a dummy file something: int = "something" Perhaps it's only in Windows? There are some |
I can indeed repro this on Windows with the latest mypy in a fresh venv... strange It also appears the .dmypy.json file sticks around afterwards as well... |
It's on my machine on Windows too. |
Interestingly, the "temporary" fix does not work if enable_error_code = ignore-without-code is also set. |
I'm getting this same error on windows. The same project works fine on MacOS :-) |
It appears to also be the case with Edit: nvm |
OK, I think I figured it out,
The tricky part is that I don't have a Windows machine, but I guess I can tweak Linux code to use Windows logic (and in CI we have Windows). |
Can someone who has a Windows machine please check if #15429 fixes their issue? |
Fixes #10709 Two changes here: * Add equality methods to `ErrorCode` because they may appear in options snapshots * Use stable comparison for option snapshots, since `Options.apply_changes()` does some unrelated things with flags Both are only relevant on Windows where options may roundtrip as: `options -> snapshot -> pickle -> base64 -> unpickle -> apply_changes`.
Bug Report
Since at least
v0.902
, executingdmypy run
in a project that hasignore_missing_imports = True
inmypy.ini
is not working anymore.To Reproduce
(Write your steps here:)
src/something.py
with some code in it, and createmypy.ini
with:dmypy run
Expected Behavior
dmypy run
should execute correctly, outputting something like:Actual Behavior
dmypy run
keeps showing:even when trying to run it again.
Your Environment
v0.902
,v0.910
and0.920+dev.379622de482ec16dd1676ad6d183dcfca5203194
dmypy run
mypy.ini
(and other config files):The text was updated successfully, but these errors were encountered: