-
-
Notifications
You must be signed in to change notification settings - Fork 351
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
Fix KI protection decorator #2781
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2781 +/- ##
=======================================
Coverage 98.94% 98.94%
=======================================
Files 113 113
Lines 16919 16920 +1
Branches 3050 3050
=======================================
+ Hits 16741 16742 +1
Misses 123 123
Partials 55 55
|
Can confirm that it fixes my |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense as a solution, I had a little difficulty too when doing this originally. Actually though, it'd be better to use a typevar with bound=Callable
, instead of ParamSpec - in that case, the checker can preserve the entire function type, including things like overloads.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
though if teamspen's suggestion of a typevar works that sounds like it would be even better
I'm not entirely sure this is possible due to use using |
This should fix the
trio.Lock
issue in #2775.