Skip to content

Commit 5915e5b

Browse files
chore(pre-commit.ci): pre-commit autoupdate (#1549)
* chore(pre-commit.ci): pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.1.0 → v0.11.0](astral-sh/ruff-pre-commit@v0.1.0...v0.11.0) * chore(pre-commit.ci): auto fixes * chore: fix violations --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: J. Nick Koston <nick@koston.org>
1 parent 806e367 commit 5915e5b

25 files changed

+112
-91
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ repos:
4040
- id: pyupgrade
4141
args: [--py39-plus]
4242
- repo: https://github.com/astral-sh/ruff-pre-commit
43-
rev: v0.1.0
43+
rev: v0.11.0
4444
hooks:
4545
- id: ruff
4646
args: [--fix, --exit-non-zero-on-fix]

build_ext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def build_extensions(self) -> None:
5353

5454

5555
def build(setup_kwargs: Any) -> None:
56-
if os.environ.get("SKIP_CYTHON", False):
56+
if os.environ.get("SKIP_CYTHON"):
5757
return
5858
try:
5959
from Cython.Build import cythonize

src/zeroconf/_services/browser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def generate_service_query(
278278
if not qu_question and question_history.suppresses(question, now_millis, known_answers):
279279
log.debug("Asking %s was suppressed by the question history", question)
280280
continue
281-
if TYPE_CHECKING: # noqa: SIM108
281+
if TYPE_CHECKING:
282282
pointer_known_answers = cast(set[DNSPointer], known_answers)
283283
else:
284284
pointer_known_answers = known_answers

tests/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
from unittest import mock
3030

3131
import ifaddr
32+
3233
from zeroconf import DNSIncoming, DNSQuestion, DNSRecord, Zeroconf
3334
from zeroconf._history import QuestionHistory
3435

tests/benchmarks/test_cache.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
from pytest_codspeed import BenchmarkFixture
4+
45
from zeroconf import DNSCache, DNSPointer, current_time_millis
56
from zeroconf.const import _CLASS_IN, _TYPE_PTR
67

tests/benchmarks/test_incoming.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import socket
66

77
from pytest_codspeed import BenchmarkFixture
8+
89
from zeroconf import (
910
DNSAddress,
1011
DNSIncoming,

tests/benchmarks/test_outgoing.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import annotations
44

55
from pytest_codspeed import BenchmarkFixture
6+
67
from zeroconf._protocol.outgoing import State
78

89
from .helpers import generate_packets

tests/benchmarks/test_send.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44

55
import pytest
66
from pytest_codspeed import BenchmarkFixture
7+
78
from zeroconf.asyncio import AsyncZeroconf
89

910
from .helpers import generate_packets
1011

1112

12-
@pytest.mark.asyncio()
13+
@pytest.mark.asyncio
1314
async def test_sending_packets(benchmark: BenchmarkFixture) -> None:
1415
"""Benchmark sending packets."""
1516
aiozc = AsyncZeroconf(interfaces=["127.0.0.1"])

tests/benchmarks/test_txt_properties.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
from pytest_codspeed import BenchmarkFixture
4+
45
from zeroconf import ServiceInfo
56

67
info = ServiceInfo(

tests/conftest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from unittest.mock import patch
77

88
import pytest
9+
910
from zeroconf import _core, const
1011
from zeroconf._handlers import query_handler
1112

@@ -19,7 +20,7 @@ def verify_threads_ended():
1920
assert not threads
2021

2122

22-
@pytest.fixture()
23+
@pytest.fixture
2324
def run_isolated():
2425
"""Change the mDNS port to run the test in isolation."""
2526
with (
@@ -30,7 +31,7 @@ def run_isolated():
3031
yield
3132

3233

33-
@pytest.fixture()
34+
@pytest.fixture
3435
def disable_duplicate_packet_suppression():
3536
"""Disable duplicate packet suppress.
3637

0 commit comments

Comments
 (0)