Update python-typing-update to 0.5.0 (#80315)

This commit is contained in:
Marc Mueller 2022-10-14 13:21:37 +02:00 committed by GitHub
parent f21a004aa9
commit a63c9e8fb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

@ -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:

View File

@ -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.

View File

@ -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",