mirror of
https://github.com/home-assistant/core.git
synced 2025-11-13 21:10:25 +00:00
Correct typing in azure_devops and activate mypy (#53152)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
This commit is contained in:
@@ -97,7 +97,7 @@ class AzureDevOpsLatestBuildSensor(AzureDevOpsSensor):
|
||||
"mdi:pipe",
|
||||
)
|
||||
|
||||
async def _azure_devops_update(self) -> bool:
|
||||
async def _azure_devops_update(self) -> None:
|
||||
"""Update Azure DevOps entity."""
|
||||
try:
|
||||
build: DevOpsBuild = await self.client.get_build(
|
||||
@@ -106,7 +106,7 @@ class AzureDevOpsLatestBuildSensor(AzureDevOpsSensor):
|
||||
except aiohttp.ClientError as exception:
|
||||
_LOGGER.warning(exception)
|
||||
self._attr_available = False
|
||||
return False
|
||||
return
|
||||
self._attr_state = build.build_number
|
||||
self._attr_extra_state_attributes = {
|
||||
"definition_id": build.definition.id,
|
||||
@@ -123,4 +123,3 @@ class AzureDevOpsLatestBuildSensor(AzureDevOpsSensor):
|
||||
"finish_time": build.finish_time,
|
||||
}
|
||||
self._attr_available = True
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user