-
Notifications
You must be signed in to change notification settings - Fork 767
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
Type info of decorated class is not helpful with specific attribute class #728
Comments
This is likely due to the Where can we find the code for |
I found this when I was using I think you can get and here's url of the repository gin |
Yeah, they haven't annotated it at all: https://github.com/google/gin-config/blob/0841fef568722a21e4f3745a0697da608ba4376e/gin/config.py#L1163 Though I'm a bit confused, as I believe we had a heuristic where we would assume that the decorator did nothing to the signature if the decorator was untyped. @erictraut Am I misremembering that? |
That's definitely the way it used to work. I'm wondering if maybe I broke that heuristic when I added support for PEP 614. I don't think we have a specific unit test for this heuristic, and we probably should. |
This will be addressed in the next release. See microsoft/pyright#1292 for details. |
This issue has been fixed in version 2021.1.0, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#202110-6-january-2021 |
When
gin.configurable
decorates any class, pylance's suggestions shows pretty useless information. It works well when the class is decorated withattr.attrs
, or any other attribute method.This makes it hard to work with tf-agents that most of classes are decorated with
gin
attribute....Is there any workaround to resolve this?
The text was updated successfully, but these errors were encountered: