1
mirror of https://github.com/home-assistant/core synced 2024-07-09 04:58:30 +02:00

Update pyupgrade to v2.37.1 (#74989)

This commit is contained in:
Franck Nijhof 2022-07-11 16:54:01 +02:00 committed by GitHub
parent 73a8ae35c2
commit af2feb3d40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 13 additions and 11 deletions

View File

@ -1,6 +1,6 @@
repos: repos:
- repo: https://github.com/asottile/pyupgrade - repo: https://github.com/asottile/pyupgrade
rev: v2.34.0 rev: v2.37.1
hooks: hooks:
- id: pyupgrade - id: pyupgrade
args: [--py39-plus] args: [--py39-plus]

View File

@ -12,5 +12,5 @@ mccabe==0.6.1
pycodestyle==2.8.0 pycodestyle==2.8.0
pydocstyle==6.1.1 pydocstyle==6.1.1
pyflakes==2.4.0 pyflakes==2.4.0
pyupgrade==2.34.0 pyupgrade==2.37.1
yamllint==1.27.1 yamllint==1.27.1

View File

@ -1,10 +1,11 @@
"""Mocks for the august component.""" """Mocks for the august component."""
from __future__ import annotations from __future__ import annotations
from collections.abc import Iterable
import json import json
import os import os
import time import time
from typing import Any, Iterable from typing import Any
from unittest.mock import AsyncMock, MagicMock, PropertyMock, patch from unittest.mock import AsyncMock, MagicMock, PropertyMock, patch
from yalexs.activity import ( from yalexs.activity import (

View File

@ -8,11 +8,11 @@ forward exercising the triggers.
""" """
from __future__ import annotations from __future__ import annotations
from collections.abc import Callable from collections.abc import Callable, Generator
import datetime import datetime
import logging import logging
import secrets import secrets
from typing import Any, Generator from typing import Any
from unittest.mock import patch from unittest.mock import patch
import pytest import pytest

View File

@ -1,10 +1,10 @@
"""Test configuration and mocks for the google integration.""" """Test configuration and mocks for the google integration."""
from __future__ import annotations from __future__ import annotations
from collections.abc import Awaitable, Callable from collections.abc import Awaitable, Callable, Generator
import datetime import datetime
import http import http
from typing import Any, Generator, TypeVar from typing import Any, TypeVar
from unittest.mock import Mock, mock_open, patch from unittest.mock import Mock, mock_open, patch
from aiohttp.client_exceptions import ClientError from aiohttp.client_exceptions import ClientError

View File

@ -2,11 +2,11 @@
from __future__ import annotations from __future__ import annotations
from collections.abc import Awaitable, Callable from collections.abc import Awaitable, Callable, Generator
import copy import copy
from dataclasses import dataclass, field from dataclasses import dataclass, field
import time import time
from typing import Any, Generator, TypeVar from typing import Any, TypeVar
from google_nest_sdm.auth import AbstractAuth from google_nest_sdm.auth import AbstractAuth
from google_nest_sdm.device import Device from google_nest_sdm.device import Device

View File

@ -12,10 +12,10 @@ so that it can inspect the output.
from __future__ import annotations from __future__ import annotations
import asyncio import asyncio
from collections.abc import Generator
from http import HTTPStatus from http import HTTPStatus
import logging import logging
import threading import threading
from typing import Generator
from unittest.mock import Mock, patch from unittest.mock import Mock, patch
from aiohttp import web from aiohttp import web

View File

@ -2,9 +2,10 @@
# pylint: disable=protected-access # pylint: disable=protected-access
from __future__ import annotations from __future__ import annotations
from collections.abc import Sequence
from dataclasses import dataclass from dataclasses import dataclass
from datetime import timedelta from datetime import timedelta
from typing import Any, Callable, Sequence from typing import Any, Callable
from unittest.mock import Mock from unittest.mock import Mock
from pyunifiprotect import ProtectApiClient from pyunifiprotect import ProtectApiClient