Skip to content

Commit

Permalink
Update pre-commit-config [Py310] (home-assistant#86415)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p authored Jan 23, 2023
1 parent 6397138 commit 4f87c1f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ repos:
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py39-plus]
args: [--py310-plus]
- repo: https://github.com/PyCQA/autoflake
rev: v2.0.0
hooks:
Expand Down Expand Up @@ -84,7 +84,7 @@ repos:
- id: python-typing-update
stages: [manual]
args:
- --py39-plus
- --py310-plus
- --force
- --keep-updates
files: ^(homeassistant|tests|script)/.+\.py$
Expand Down
3 changes: 1 addition & 2 deletions homeassistant/helpers/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
import dataclasses
from functools import partial, wraps
import logging
from typing import TYPE_CHECKING, Any, TypedDict, TypeVar
from typing import TYPE_CHECKING, Any, TypedDict, TypeGuard, TypeVar

from typing_extensions import TypeGuard
import voluptuous as vol

from homeassistant.auth.permissions.const import CAT_ENTITIES, POLICY_CONTROL
Expand Down
5 changes: 2 additions & 3 deletions tests/components/bluetooth/test_wrappers.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"""Tests for the Bluetooth integration."""

from __future__ import annotations

from collections.abc import Callable
from typing import Union
from unittest.mock import patch

import bleak
Expand Down Expand Up @@ -66,7 +65,7 @@ def inject_advertisement(
class BaseFakeBleakClient:
"""Base class for fake bleak clients."""

def __init__(self, address_or_ble_device: Union[BLEDevice, str], **kwargs):
def __init__(self, address_or_ble_device: BLEDevice | str, **kwargs):
"""Initialize the fake bleak client."""
self._device_path = "/dev/test"
self._device = address_or_ble_device
Expand Down

0 comments on commit 4f87c1f

Please sign in to comment.