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

Make typed decorators work for instance methods #1826

Conversation

PeterJCLaw
Copy link
Collaborator

This feels incomplete when compared to FunctionMixin.py__get__, however seems to work at least in the cut-down reported.

I've also manually checked that this fixes the more complete version (i.e: with contextmanager).

Fixes #1801.

@codecov-commenter
Copy link

codecov-commenter commented Dec 12, 2021

Codecov Report

Merging #1826 (b6f761f) into master (3602c10) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1826   +/-   ##
=======================================
  Coverage   94.48%   94.48%           
=======================================
  Files          80       80           
  Lines       11839    11841    +2     
=======================================
+ Hits        11186    11188    +2     
  Misses        653      653           
Impacted Files Coverage Δ
jedi/inference/gradual/typing.py 93.46% <100.00%> (+0.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3602c10...b6f761f. Read the comment docs.

@PeterJCLaw
Copy link
Collaborator Author

Hrm, the failure here looks to be #1824

This feels incomplete when compared to FunctionMixin.py__get__,
however seems to work at least in the cut-down reported.

Fixes davidhalter#1801.
@PeterJCLaw PeterJCLaw force-pushed the fix-1801-typed-decorator-on-instance-method branch from e576565 to b6f761f Compare December 12, 2021 18:19
@davidhalter davidhalter merged commit 08c5ab8 into davidhalter:master Dec 13, 2021
@davidhalter
Copy link
Owner

Thanks! I agree that this is probably incomplete, but it's still good enough. If people are running into issues, they will definitely tell us :).

@PeterJCLaw PeterJCLaw deleted the fix-1801-typed-decorator-on-instance-method branch May 27, 2023 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No completion found for a contextmanager decorating a class method
3 participants