Improve reolink generic typing#88786
Conversation
|
Hey there @starkillerOG, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
| if self.coordinator.data is None: | ||
| return None | ||
|
|
There was a problem hiding this comment.
If the check for new firmware fails, it will raise either a TimeoutError or UpdateFailed. Both will set last_updaate_success = False which in turn will set the available property to False. So this shouldn't be necessary.
core/homeassistant/components/reolink/__init__.py
Lines 85 to 91 in e00ff54
There was a problem hiding this comment.
True, this can indeed be removed.
| if self.coordinator.data is None: | ||
| return None | ||
|
|
There was a problem hiding this comment.
True, this can indeed be removed.
|
@cdce8p thanks for this PR! |
|
@starkillerOG Would you mind to take a look at this again? I've rebased the PR and added |
|
@cdce8p Alright I was very confused at first but now I do get it, but the naming is very confusing. Please Update the ReolinkHostCoordinatorEntity description to: Also please change the Base Coordinator description accordingly. Unfortunatly the imports in all platforms will then also have to be updated (sorry). |
starkillerOG
left a comment
There was a problem hiding this comment.
Looks good to me, appart for one docstring.
Co-authored-by: starkillerOG <starkiller.og@gmail.com>
Proposed change
Improve generic typing around
CoordinatorEntityandDataUpdateCoordinator.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: