Skip to content
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

Investigate handling of unannotated decorators #1292

Closed
erictraut opened this issue Dec 18, 2020 · 2 comments
Closed

Investigate handling of unannotated decorators #1292

erictraut opened this issue Dec 18, 2020 · 2 comments
Labels
addressed in next version Issue is fixed and will appear in next published version enhancement request New feature or request

Comments

@erictraut
Copy link
Collaborator

Refer to this pylance issue: microsoft/pylance-release#728 (comment)

@erictraut erictraut added needs investigation Requires additional investigation to determine course of action addressed in next version Issue is fixed and will appear in next published version enhancement request New feature or request and removed needs investigation Requires additional investigation to determine course of action labels Dec 18, 2020
@erictraut
Copy link
Collaborator Author

I verified that the heuristics were still in place for ignoring the application of a decorator. However, the heuristic was applied only if the application of the decorator (either a class or function decorator) resulted in the type Unknown. In the example provided in the linked bug, the resulting type was a union of several subtypes including Unknown. I've updated the heuristic to apply in this case as well.

@erictraut
Copy link
Collaborator Author

This change is in Pyright 1.1.96, which I just published. It will also be in the next published release of Pylance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addressed in next version Issue is fixed and will appear in next published version enhancement request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant