diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e4a88203..8fa230de 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,12 +9,12 @@ ci: repos: - repo: https://github.com/commitizen-tools/commitizen - rev: v2.32.4 + rev: v3.27.0 hooks: - id: commitizen stages: [commit-msg] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.6.0 hooks: - id: debug-statements - id: check-builtin-literals @@ -29,12 +29,12 @@ repos: - id: trailing-whitespace - id: debug-statements - repo: https://github.com/pre-commit/mirrors-prettier - rev: v2.7.1 + rev: v4.0.0-alpha.8 hooks: - id: prettier args: ["--tab-width", "2"] - repo: https://github.com/asottile/pyupgrade - rev: v2.37.3 + rev: v3.16.0 hooks: - id: pyupgrade args: [--py37-plus] @@ -53,7 +53,7 @@ repos: hooks: - id: flake8 - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.931 + rev: v1.10.1 hooks: - id: mypy additional_dependencies: [] diff --git a/src/zeroconf/__init__.py b/src/zeroconf/__init__.py index 0c89a881..f3130307 100644 --- a/src/zeroconf/__init__.py +++ b/src/zeroconf/__init__.py @@ -20,8 +20,6 @@ USA """ -import sys - from ._cache import DNSCache # noqa # import needed for backwards compat from ._core import Zeroconf from ._dns import ( # noqa # import needed for backwards compat @@ -114,12 +112,3 @@ "NotRunningException", "ServiceNameAlreadyRegistered", ] - -if sys.version_info <= (3, 6): # pragma: no cover - raise ImportError( # pragma: no cover - """ -Python version > 3.6 required for python-zeroconf. -If you need support for Python 2 or Python 3.3-3.4 please use version 19.1 -If you need support for Python 3.5 please use version 0.28.0 - """ - ) diff --git a/src/zeroconf/_engine.py b/src/zeroconf/_engine.py index 6083c19a..afe22f59 100644 --- a/src/zeroconf/_engine.py +++ b/src/zeroconf/_engine.py @@ -105,7 +105,7 @@ async def _async_create_endpoints(self) -> None: sender_sockets.append(s) for s in reader_sockets: - transport, protocol = await loop.create_datagram_endpoint( + transport, protocol = await loop.create_datagram_endpoint( # type: ignore[type-var] lambda: AsyncListener(self.zc), # type: ignore[arg-type, return-value] sock=s, )