Skip to content

Commit af2feb3

Browse files
authored
Update pyupgrade to v2.37.1 (home-assistant#74989)
1 parent 73a8ae3 commit af2feb3

File tree

8 files changed

+13
-11
lines changed

8 files changed

+13
-11
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/asottile/pyupgrade
3-
rev: v2.34.0
3+
rev: v2.37.1
44
hooks:
55
- id: pyupgrade
66
args: [--py39-plus]

requirements_test_pre_commit.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ mccabe==0.6.1
1212
pycodestyle==2.8.0
1313
pydocstyle==6.1.1
1414
pyflakes==2.4.0
15-
pyupgrade==2.34.0
15+
pyupgrade==2.37.1
1616
yamllint==1.27.1

tests/components/august/mocks.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
"""Mocks for the august component."""
22
from __future__ import annotations
33

4+
from collections.abc import Iterable
45
import json
56
import os
67
import time
7-
from typing import Any, Iterable
8+
from typing import Any
89
from unittest.mock import AsyncMock, MagicMock, PropertyMock, patch
910

1011
from yalexs.activity import (

tests/components/calendar/test_trigger.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
"""
99
from __future__ import annotations
1010

11-
from collections.abc import Callable
11+
from collections.abc import Callable, Generator
1212
import datetime
1313
import logging
1414
import secrets
15-
from typing import Any, Generator
15+
from typing import Any
1616
from unittest.mock import patch
1717

1818
import pytest

tests/components/google/conftest.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""Test configuration and mocks for the google integration."""
22
from __future__ import annotations
33

4-
from collections.abc import Awaitable, Callable
4+
from collections.abc import Awaitable, Callable, Generator
55
import datetime
66
import http
7-
from typing import Any, Generator, TypeVar
7+
from typing import Any, TypeVar
88
from unittest.mock import Mock, mock_open, patch
99

1010
from aiohttp.client_exceptions import ClientError

tests/components/nest/common.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
from __future__ import annotations
44

5-
from collections.abc import Awaitable, Callable
5+
from collections.abc import Awaitable, Callable, Generator
66
import copy
77
from dataclasses import dataclass, field
88
import time
9-
from typing import Any, Generator, TypeVar
9+
from typing import Any, TypeVar
1010

1111
from google_nest_sdm.auth import AbstractAuth
1212
from google_nest_sdm.device import Device

tests/components/stream/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
from __future__ import annotations
1313

1414
import asyncio
15+
from collections.abc import Generator
1516
from http import HTTPStatus
1617
import logging
1718
import threading
18-
from typing import Generator
1919
from unittest.mock import Mock, patch
2020

2121
from aiohttp import web

tests/components/unifiprotect/utils.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
# pylint: disable=protected-access
33
from __future__ import annotations
44

5+
from collections.abc import Sequence
56
from dataclasses import dataclass
67
from datetime import timedelta
7-
from typing import Any, Callable, Sequence
8+
from typing import Any, Callable
89
from unittest.mock import Mock
910

1011
from pyunifiprotect import ProtectApiClient

0 commit comments

Comments
 (0)