mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
Update python-typing-update to 0.5.0 (#80315)
This commit is contained in:
parent
f21a004aa9
commit
a63c9e8fb9
@ -69,11 +69,12 @@ repos:
|
||||
hooks:
|
||||
- id: prettier
|
||||
- repo: https://github.com/cdce8p/python-typing-update
|
||||
rev: v0.3.5
|
||||
rev: v0.5.0
|
||||
hooks:
|
||||
# Run `python-typing-update` hook manually from time to time
|
||||
# to update python typing syntax.
|
||||
# Will require manual work, before submitting changes!
|
||||
# pre-commit run --hook-stage manual python-typing-update --all-files
|
||||
- id: python-typing-update
|
||||
stages: [manual]
|
||||
args:
|
||||
|
@ -1,4 +1,6 @@
|
||||
"""Provides device automations for Philips Hue events in V1 bridge/api."""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import voluptuous as vol
|
||||
@ -173,9 +175,7 @@ async def async_attach_trigger(
|
||||
|
||||
|
||||
@callback
|
||||
def async_get_triggers(
|
||||
bridge: "HueBridge", device: DeviceEntry
|
||||
) -> list[dict[str, str]]:
|
||||
def async_get_triggers(bridge: HueBridge, device: DeviceEntry) -> list[dict[str, str]]:
|
||||
"""Return device triggers for device on `v1` bridge.
|
||||
|
||||
Make sure device is a supported remote model.
|
||||
|
@ -1,5 +1,6 @@
|
||||
"""Tests for the Airthings BLE integration."""
|
||||
from typing import Union
|
||||
from __future__ import annotations
|
||||
|
||||
from unittest.mock import patch
|
||||
|
||||
from airthings_ble import AirthingsBluetoothDeviceData, AirthingsDevice
|
||||
@ -17,9 +18,7 @@ def patch_async_setup_entry(return_value=True):
|
||||
)
|
||||
|
||||
|
||||
def patch_async_ble_device_from_address(
|
||||
return_value: Union[BluetoothServiceInfoBleak, None]
|
||||
):
|
||||
def patch_async_ble_device_from_address(return_value: BluetoothServiceInfoBleak | None):
|
||||
"""Patch async ble device from address to return a given value."""
|
||||
return patch(
|
||||
"homeassistant.components.bluetooth.async_ble_device_from_address",
|
||||
|
Loading…
x
Reference in New Issue
Block a user