Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand All @@ -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: []
11 changes: 0 additions & 11 deletions src/zeroconf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
"""
)
2 changes: 1 addition & 1 deletion src/zeroconf/_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down