-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Revealed type of click decorators is Any #6156
Comments
This is probably the same kind of issue as #5751. |
If you are using the latest click, you don't need |
Thanks. The issue does not occur for me with click 8.0.3, but this is still a problem for users who are pinned against the older version(s). Additional information: I have been told that pyright is able to do the right thing with this stub, which along with #5751 makes me think this issue is already being tracked. Closing this issue, thanks for the info y'all. |
For what it's worth, I experienced this regression when migrating between development environments due to a pinned dependency which itself pinned I'm going to completely redo my dependency management in this case because it just makes sense but definitely a regression imo, not sure if it will impact anything else. |
The only other report we've had of this kind of problem is with |
In the end my issue does not seem to be related to this library. I thought it would be but I dug more into it and confirmed it is not. Letting you know so you don't worry about it too much hehe. |
NOTE: Appears to be caused by #5483. Issue does not occur against stubs prior to 7a9a107 (e.g. with
types-click==0.1.12
).The stubs for
click
annotate the return type of many of the library's decorator factories asIdentityFunction
(e.g. seeargument
stub, but the revealed type when runningmypy
isAny
. See sample program below.I'm not sure if this is indicative of an underlying bug in
mypy
or if there's something missing in the usage ofIdentityFunction
fromtypeshed
that keeps it from resolving that helper. Insight from someone who is more familiar with the details would be appreciated.Sample program
Output
Version information
mypy
: 0.910types-click
: 7.1.6NOTE: I am submitting this issue on behalf of a user who asked a question about it in #python on the Libera IRC network.
The text was updated successfully, but these errors were encountered: