-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
dmypy gives up on trivial decorator #18940
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
I can check it out. |
Note that the line you commented about is a special case for this decorator seemingly (I have not tested): def f(x: T) -> T:
return x So as a workaround you could use that, especially if you're not using the paramspec to transform parameters! |
I could but I have no control over the particular decorator -- and the real one uses the ParamSpec also would like to use |
first commit automated via https://github.com/getsentry/auto-type-annotate - I used these patches to mypy: - python/mypy#18948 - (the line mentioned in the issue commented out): python/mypy#18940 (comment) - and with this unreverted (coming soon!): #89854 <!-- Describe your PR here. -->
first commit automated via https://github.com/getsentry/auto-type-annotate - I used these patches to mypy: - python/mypy#18948 - (the line mentioned in the issue commented out): python/mypy#18940 (comment) - and with this unreverted (coming soon!): #89854 <!-- Describe your PR here. -->
Bug Report
seems dmypy is unable to suggest an annotation when a function is decorated even with a trivial decorator (likely as the implementation predates widespread ParamSpec usage)
I believe the fix is deleting this line?
mypy/mypy/suggestions.py
Line 656 in 454989f
To Reproduce
Expected Behavior
Actual Behavior
Your Environment
mypy.ini
(and other config files): (see above)The text was updated successfully, but these errors were encountered: