-
Notifications
You must be signed in to change notification settings - Fork 25
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
subscriptable dicts not recognized as Python 3.9 #86
Comments
Thanks for reporting this! I'll have a look soon. |
As per the caveats section of the README:
If you use
As a side note, I've added heuristics for displaying when generic or literal annotations might be in use, which would display the following tip:
But it does not show in this specific case. I'll see if that can happen without ruining things/tests. |
I've improved the heuristics such that it will show the above tip in your case: v1.4.2 |
Great, thanks for the hint! I obviously didn't read the caveats section correctly, sorry. The added tip is indeed helpful. |
Don't mention it. Glad it helped. :-) |
Describe the bug
In Python < 3.9, subscripting a
dict
results in a type error. This was apparently changed with PEP 585. vermin does not recognize this version dependency.To Reproduce
Use this file
testcase.py
:Run as such:
Expected behavior
Something like this:
Environment (please complete the following information):
vermin 1.4.1, git ec1e551
Additional context
Note: In order to restore compatibility with Python < 3.9, the subscripted
dict
can be replaced withtyping.Dict
, perhaps with an explicit typecast to a list, as used in the example above. That's not what vermin is concerned with, but what I had to do, to get rid of the surprising (as unreported) dependency.The text was updated successfully, but these errors were encountered: