-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Relax typing on cached_property to accept subclasses #95407
Conversation
broken out from #95315
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.
Does it work if we reuse the typeshed
typing?
https://github.com/python/typeshed/blob/7d33060e6ae3ebe54462a891f0c566c97371915b/stdlib/functools.pyi#L196-L208
Adjusted to match. Will wait for CI run and than pull out the entity changes if it passes |
Doesn't look like it, unfortunately. Let's just change |
👍 |
I think the current errors are ok as we want everything downstream to be a |
In that case, |
This reverts commit 6eeaa51.
Sounds good. I reverted the covar. This is good because it means it should work 1:1 when we no longer have the backport and can use the cpython 3.12 version as it matches typeshed |
Thanks. Checking typeshed was a good call |
Proposed change
This might need to be adjusted some more. That can happen here or in a future PR (this is new and we are still figuring out how its going to be fit in).
The goal was to get it working with #95315
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: