-
Notifications
You must be signed in to change notification settings - Fork 61
MyPy fixes and a few optimizations #675
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
base: paramspec
Are you sure you want to change the base?
Conversation
This pr is for #508 btw. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## paramspec #675 +/- ##
============================================
Coverage ? 96.63%
============================================
Files ? 12
Lines ? 803
Branches ? 33
============================================
Hits ? 776
Misses ? 25
Partials ? 2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
This PR has 12 type errors, which is 2 more than without the changes in this PR...
I'm still not seeing any type fixes yet. The thing we need to focus on is resolving the type errors with methods, as described in #508 (comment) |
@Dreamsorcerer I agree. There's also some bugs with trying to fix Self functions in the tests. There's a bug with A.coro where it hints as [(self:A), ...] instead of [(), ...] which mypy complains about as well. I thought about giving alru-cache a dummy argument to overload class methods vs functions as an overload wrapper to maybe try and patch it until python wants to give better support to Concatenate & ParamSpec in the future. I there's a chance mypy can accept it and I'll report back my findings... |
I'm pretty sure that's the issue I highlighted in the comment, not a bug with mypy. As mentioned, I think the most likely option to work is splitting into 2 subclasses to handle method and non-method separately. |
What do these changes do?
These changes optimize a few functions and fix mypy for the pull request made with #508
Are there changes in behavior for the user?
Maybe a performance increase although my changes mainly nested in a single coroutine in order to enhance execution.
A Word for VS-Code Users
There is currently no fix for VS Code Users even though the code works correctly. This is something that someone is going to have to be brought up with the VS-Code Development team directly as it's not our faults. Now maybe if your using a different extension there will be a patch in the future but I think the only way this will be solved if we go ahead and add this on our end or add in a comment mentioning this bug and how it affects users who wish to use method descriptors.
Related issue number
Checklist