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:
- repo: https://github.com/asottile/pyupgrade
rev: v2.34.0
rev: v2.37.1
hooks:
- id: pyupgrade
args: [--py39-plus]

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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