-
-
Notifications
You must be signed in to change notification settings - Fork 3k
dmypy: ValueError: value is not in list when running a second time #12744
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
Comments
Here's a better error message from 0.960 in current master, from the daemon log file
|
A simple test case to repro
It looks like |
Oh wow, it is actually worse. Because of a bug in cc @JukkaL |
Fixes #12744 The fix is straightforward. Current logic can produce a random mix of old and new nodes if there are functions/methods nested in other statements.
As I need dmypy to work without facing [1], I am running the latest build of mypy which seems so far to finally not have that issue. update constructs that latest mypy is being more picky about, including better typing for the _NONE_NAME symbol used in constraints (porting those elements from the Enum patch at I15ac3daee770408b5795746f47c1bbd931b7d26d) [1] python/mypy#12744 Change-Id: Ib3f56787fa65ea9bb2e6a0bccc4d99f54c516dad
my dmypy use is totally different since this bug was fixed, I can now leave it running and "dmypy check lib" doesn't crash even when I check out different branches. Previously, any code changes beyond a dozen lines would guaranteed crash every time. looks like it was all the same thing, thanks for fixing! |
Glad to hear it helped! |
I've had problems with this situation on and off for many weeks now, with 0.941 and now 0.950. sometimes it isn't happening at all, and other times, like at the moment, I get this stack trace reliably on any second run of dympy. Typically, once I get the files I'm typing in better shape, the error goes away. But to get there my process is greatly slowed by dmypy crashing on every non-initial run making it mostly not useful compared to running plain mypy.
reproduction steps follow below. the crash is:
steps to reproduce:
I'm able to reproduce this from running the steps above in a brand new directory.
I fully expect there is something in my code making it do this which I am sure is some horrible mistake I'm making, however, dmypy should tell me what the mistake is rather than crashing. Thanks and sorry for the complex reproduction instructions
The text was updated successfully, but these errors were encountered: