Bump pyupgrade from 3.1.0 to 3.2.0 (#3979)
* Bump pyupgrade from 3.1.0 to 3.2.0 Bumps [pyupgrade](https://github.com/asottile/pyupgrade) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/asottile/pyupgrade/releases) - [Commits](https://github.com/asottile/pyupgrade/compare/v3.1.0...v3.2.0) --- updated-dependencies: - dependency-name: pyupgrade dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Update .pre-commit-config.yaml * Fixing pyupgrade Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
This commit is contained in:
parent
a0b28ebb97
commit
a2dffe595e
|
@ -28,7 +28,7 @@ repos:
|
|||
hooks:
|
||||
- id: isort
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v2.32.1
|
||||
rev: v3.2.0
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args: [--py310-plus]
|
||||
|
|
|
@ -11,5 +11,5 @@ pytest-asyncio==0.18.3
|
|||
pytest-cov==4.0.0
|
||||
pytest-timeout==2.1.0
|
||||
pytest==7.2.0
|
||||
pyupgrade==3.1.0
|
||||
pyupgrade==3.2.0
|
||||
time-machine==2.8.2
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
"""Init file for Supervisor add-ons."""
|
||||
import asyncio
|
||||
from collections.abc import Awaitable
|
||||
from contextlib import suppress
|
||||
from copy import deepcopy
|
||||
from ipaddress import IPv4Address
|
||||
|
@ -10,7 +11,7 @@ import secrets
|
|||
import shutil
|
||||
import tarfile
|
||||
from tempfile import TemporaryDirectory
|
||||
from typing import Any, Awaitable, Final
|
||||
from typing import Any, Final
|
||||
|
||||
import aiohttp
|
||||
from deepmerge import Merger
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
"""Init file for Supervisor add-ons."""
|
||||
from abc import ABC, abstractmethod
|
||||
from collections.abc import Awaitable
|
||||
from pathlib import Path
|
||||
from typing import Any, Awaitable
|
||||
from typing import Any
|
||||
|
||||
from awesomeversion import AwesomeVersion, AwesomeVersionException
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
"""Init file for Supervisor Home Assistant RESTful API."""
|
||||
import asyncio
|
||||
from collections.abc import Awaitable
|
||||
import logging
|
||||
from typing import Any, Awaitable
|
||||
from typing import Any
|
||||
|
||||
from aiohttp import web
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
"""Init file for Supervisor Audio RESTful API."""
|
||||
import asyncio
|
||||
from collections.abc import Awaitable
|
||||
import logging
|
||||
from typing import Any, Awaitable
|
||||
from typing import Any
|
||||
|
||||
from aiohttp import web
|
||||
import attr
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
"""Init file for Supervisor DNS RESTful API."""
|
||||
import asyncio
|
||||
from collections.abc import Awaitable
|
||||
import logging
|
||||
from typing import Any, Awaitable
|
||||
from typing import Any
|
||||
|
||||
from aiohttp import web
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
"""Init file for Supervisor Home Assistant RESTful API."""
|
||||
import asyncio
|
||||
from collections.abc import Awaitable
|
||||
import logging
|
||||
from typing import Any, Awaitable
|
||||
from typing import Any
|
||||
|
||||
from aiohttp import web
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
"""Init file for Supervisor Multicast RESTful API."""
|
||||
import asyncio
|
||||
from collections.abc import Awaitable
|
||||
import logging
|
||||
from typing import Any, Awaitable
|
||||
from typing import Any
|
||||
|
||||
from aiohttp import web
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
"""REST API for network."""
|
||||
import asyncio
|
||||
from collections.abc import Awaitable
|
||||
from ipaddress import ip_address, ip_interface
|
||||
from typing import Any, Awaitable
|
||||
from typing import Any
|
||||
|
||||
from aiohttp import web
|
||||
import attr
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
"""Init file for Supervisor HassOS RESTful API."""
|
||||
import asyncio
|
||||
from collections.abc import Awaitable
|
||||
import logging
|
||||
from pathlib import Path
|
||||
from typing import Any, Awaitable
|
||||
from typing import Any
|
||||
|
||||
from aiohttp import web
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
"""Handle REST API for resoulution."""
|
||||
import asyncio
|
||||
from typing import Any, Awaitable
|
||||
from collections.abc import Awaitable
|
||||
from typing import Any
|
||||
|
||||
from aiohttp import web
|
||||
import attr
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
"""Init file for Supervisor Home Assistant RESTful API."""
|
||||
import asyncio
|
||||
from typing import Any, Awaitable
|
||||
from collections.abc import Awaitable
|
||||
from typing import Any
|
||||
|
||||
from aiohttp import web
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
"""Init file for Supervisor Supervisor RESTful API."""
|
||||
import asyncio
|
||||
from collections.abc import Awaitable
|
||||
import logging
|
||||
from typing import Any, Awaitable
|
||||
from typing import Any
|
||||
|
||||
from aiohttp import web
|
||||
import voluptuous as vol
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
"""Representation of a backup file."""
|
||||
from base64 import b64decode, b64encode
|
||||
from collections.abc import Awaitable
|
||||
from datetime import timedelta
|
||||
import json
|
||||
import logging
|
||||
from pathlib import Path
|
||||
import tarfile
|
||||
from tempfile import TemporaryDirectory
|
||||
from typing import Any, Awaitable
|
||||
from typing import Any
|
||||
|
||||
from awesomeversion import AwesomeVersion, AwesomeVersionCompareException
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
"""Bus event system."""
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Awaitable, Callable
|
||||
import logging
|
||||
from typing import Any, Awaitable, Callable
|
||||
from typing import Any
|
||||
|
||||
import attr
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
"""Main file for Supervisor."""
|
||||
import asyncio
|
||||
from collections.abc import Awaitable
|
||||
from contextlib import suppress
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
from typing import Awaitable
|
||||
|
||||
import async_timeout
|
||||
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from collections.abc import Callable, Coroutine
|
||||
from datetime import datetime
|
||||
import logging
|
||||
import os
|
||||
from types import MappingProxyType
|
||||
from typing import TYPE_CHECKING, Any, Callable, Coroutine, TypeVar
|
||||
from typing import TYPE_CHECKING, Any, TypeVar
|
||||
|
||||
import aiohttp
|
||||
import sentry_sdk
|
||||
|
|
|
@ -2,12 +2,13 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from collections.abc import Awaitable
|
||||
from contextlib import suppress
|
||||
from ipaddress import IPv4Address, ip_address
|
||||
import logging
|
||||
import os
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING, Awaitable
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from awesomeversion import AwesomeVersion
|
||||
import docker
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
"""Init file for Supervisor Docker object."""
|
||||
from collections.abc import Awaitable
|
||||
from ipaddress import IPv4Address
|
||||
import logging
|
||||
from typing import Awaitable
|
||||
|
||||
from awesomeversion import AwesomeVersion, AwesomeVersionCompareException
|
||||
import docker
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from collections.abc import Awaitable
|
||||
from contextlib import suppress
|
||||
import logging
|
||||
import re
|
||||
from time import time
|
||||
from typing import Any, Awaitable
|
||||
from typing import Any
|
||||
|
||||
from awesomeversion import AwesomeVersion
|
||||
from awesomeversion.strategy import AwesomeVersionStrategy
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
"""Init file for Supervisor Docker object."""
|
||||
from collections.abc import Awaitable
|
||||
from ipaddress import IPv4Address
|
||||
import logging
|
||||
import os
|
||||
from typing import Awaitable
|
||||
|
||||
from awesomeversion.awesomeversion import AwesomeVersion
|
||||
import docker
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
"""Core Exceptions."""
|
||||
from typing import Callable
|
||||
from collections.abc import Callable
|
||||
|
||||
|
||||
class HassioError(Exception):
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
"""Home Assistant control object."""
|
||||
import asyncio
|
||||
from collections.abc import Awaitable
|
||||
from contextlib import suppress
|
||||
import logging
|
||||
import re
|
||||
import secrets
|
||||
import shutil
|
||||
from typing import Awaitable
|
||||
|
||||
import attr
|
||||
from awesomeversion import AwesomeVersion
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"""Service control for host."""
|
||||
from collections.abc import Awaitable
|
||||
import logging
|
||||
from typing import Awaitable
|
||||
|
||||
import attr
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
"""Job decorator."""
|
||||
import asyncio
|
||||
from collections.abc import Callable
|
||||
from datetime import datetime, timedelta
|
||||
from functools import wraps
|
||||
import logging
|
||||
from typing import Any, Callable
|
||||
from typing import Any
|
||||
|
||||
import sentry_sdk
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
"""Schedule for Supervisor."""
|
||||
import asyncio
|
||||
from collections.abc import Awaitable, Callable
|
||||
from datetime import date, datetime, time, timedelta
|
||||
import logging
|
||||
from typing import Awaitable, Callable
|
||||
from uuid import UUID, uuid4
|
||||
|
||||
import async_timeout
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
"""OS support on supervisor."""
|
||||
import asyncio
|
||||
from collections.abc import Awaitable
|
||||
import logging
|
||||
from pathlib import Path
|
||||
from typing import Awaitable
|
||||
|
||||
import aiohttp
|
||||
from awesomeversion import AwesomeVersion, AwesomeVersionException
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
"""Supervisor plugins base class."""
|
||||
from abc import ABC, abstractmethod
|
||||
import asyncio
|
||||
from collections.abc import Awaitable
|
||||
from contextlib import suppress
|
||||
import logging
|
||||
from typing import Awaitable
|
||||
|
||||
from awesomeversion import AwesomeVersion, AwesomeVersionException
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
Code: https://github.com/home-assistant/plugin-cli
|
||||
"""
|
||||
import asyncio
|
||||
from collections.abc import Awaitable
|
||||
from contextlib import suppress
|
||||
import logging
|
||||
import secrets
|
||||
from typing import Awaitable
|
||||
|
||||
from awesomeversion import AwesomeVersion
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
"""Init file for Supervisor add-on data."""
|
||||
from collections.abc import Awaitable
|
||||
import logging
|
||||
from pathlib import Path
|
||||
from typing import Any, Awaitable
|
||||
from typing import Any
|
||||
|
||||
import voluptuous as vol
|
||||
from voluptuous.humanize import humanize_error
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
"""Home Assistant control object."""
|
||||
import asyncio
|
||||
from collections.abc import Awaitable
|
||||
from contextlib import suppress
|
||||
from datetime import timedelta
|
||||
from ipaddress import IPv4Address
|
||||
import logging
|
||||
from pathlib import Path
|
||||
from tempfile import TemporaryDirectory
|
||||
from typing import Awaitable
|
||||
|
||||
import aiohttp
|
||||
from aiohttp.client_exceptions import ClientError
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from collections.abc import Awaitable, Callable, Coroutine
|
||||
import logging
|
||||
from typing import Any, Awaitable, Callable, Coroutine
|
||||
from typing import Any
|
||||
|
||||
from dbus_fast import (
|
||||
ErrorType,
|
||||
|
|
Loading…
Reference in New Issue