diff --git a/bin/tests/system/bailiwick/ans1/ans.py b/bin/tests/system/bailiwick/ans1/ans.py index 7606236fda..75bf8790b2 100644 --- a/bin/tests/system/bailiwick/ans1/ans.py +++ b/bin/tests/system/bailiwick/ans1/ans.py @@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import dns.rdatatype import dns.rrset diff --git a/bin/tests/system/bailiwick/ans2/ans.py b/bin/tests/system/bailiwick/ans2/ans.py index 1878167357..a1010cc5d6 100644 --- a/bin/tests/system/bailiwick/ans2/ans.py +++ b/bin/tests/system/bailiwick/ans2/ans.py @@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import dns.rdatatype import dns.rrset diff --git a/bin/tests/system/chain/ans3/ans.py b/bin/tests/system/chain/ans3/ans.py index f10387fbf4..a36ab41c70 100755 --- a/bin/tests/system/chain/ans3/ans.py +++ b/bin/tests/system/chain/ans3/ans.py @@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import dns.name import dns.rcode diff --git a/bin/tests/system/chain/ans4/ans.py b/bin/tests/system/chain/ans4/ans.py index 3e1aeea743..b21ba81fef 100755 --- a/bin/tests/system/chain/ans4/ans.py +++ b/bin/tests/system/chain/ans4/ans.py @@ -11,9 +11,9 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ +from collections.abc import AsyncGenerator from dataclasses import dataclass from enum import Enum -from typing import AsyncGenerator import abc import logging diff --git a/bin/tests/system/cookie/cookie_ans.py b/bin/tests/system/cookie/cookie_ans.py index 84d3f7011c..3b6f0406f2 100644 --- a/bin/tests/system/cookie/cookie_ans.py +++ b/bin/tests/system/cookie/cookie_ans.py @@ -9,7 +9,7 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import dns.edns import dns.name diff --git a/bin/tests/system/digdelv/ans5/ans.py b/bin/tests/system/digdelv/ans5/ans.py index e13f952279..1d7375791e 100644 --- a/bin/tests/system/digdelv/ans5/ans.py +++ b/bin/tests/system/digdelv/ans5/ans.py @@ -9,7 +9,7 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import logging diff --git a/bin/tests/system/digdelv/ans6/ans.py b/bin/tests/system/digdelv/ans6/ans.py index e723d96c16..78b9ce7040 100644 --- a/bin/tests/system/digdelv/ans6/ans.py +++ b/bin/tests/system/digdelv/ans6/ans.py @@ -9,7 +9,7 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import dns.opcode import dns.rcode diff --git a/bin/tests/system/digdelv/ans7/ans.py b/bin/tests/system/digdelv/ans7/ans.py index 0dde43c6a8..a9a8a0966c 100644 --- a/bin/tests/system/digdelv/ans7/ans.py +++ b/bin/tests/system/digdelv/ans7/ans.py @@ -9,7 +9,7 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import dns.rcode diff --git a/bin/tests/system/dispatch/ans3/ans.py b/bin/tests/system/dispatch/ans3/ans.py index 97b1f2cf1f..1099928b08 100644 --- a/bin/tests/system/dispatch/ans3/ans.py +++ b/bin/tests/system/dispatch/ans3/ans.py @@ -9,7 +9,7 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import dns.flags import dns.rcode diff --git a/bin/tests/system/dnssec/ans10/ans.py b/bin/tests/system/dnssec/ans10/ans.py index d5d22e621e..b584151f0d 100644 --- a/bin/tests/system/dnssec/ans10/ans.py +++ b/bin/tests/system/dnssec/ans10/ans.py @@ -9,7 +9,7 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import dns.rdatatype import dns.rrset diff --git a/bin/tests/system/fetchlimit/ans4/ans.py b/bin/tests/system/fetchlimit/ans4/ans.py index cd7602366b..3b01eaa6a6 100644 --- a/bin/tests/system/fetchlimit/ans4/ans.py +++ b/bin/tests/system/fetchlimit/ans4/ans.py @@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import dns.rcode import dns.rdatatype diff --git a/bin/tests/system/forward/ans11/ans.py b/bin/tests/system/forward/ans11/ans.py index b5b590aabf..9c854a6b76 100644 --- a/bin/tests/system/forward/ans11/ans.py +++ b/bin/tests/system/forward/ans11/ans.py @@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import dns.rdatatype import dns.rrset diff --git a/bin/tests/system/forward/ans6/ans.py b/bin/tests/system/forward/ans6/ans.py index fdcbe7d392..271439b37c 100644 --- a/bin/tests/system/forward/ans6/ans.py +++ b/bin/tests/system/forward/ans6/ans.py @@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import dns.name import dns.rcode diff --git a/bin/tests/system/isctest/asyncserver.py b/bin/tests/system/isctest/asyncserver.py index 453751629f..080c08c380 100644 --- a/bin/tests/system/isctest/asyncserver.py +++ b/bin/tests/system/isctest/asyncserver.py @@ -11,8 +11,9 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ +from collections.abc import AsyncGenerator, Callable, Coroutine, Sequence from dataclasses import dataclass, field -from typing import Any, AsyncGenerator, Callable, Coroutine, Sequence, cast +from typing import Any, cast import abc import asyncio diff --git a/bin/tests/system/isctest/log/watchlog.py b/bin/tests/system/isctest/log/watchlog.py index f1fc0ec8fa..22f81b94fa 100644 --- a/bin/tests/system/isctest/log/watchlog.py +++ b/bin/tests/system/isctest/log/watchlog.py @@ -9,7 +9,8 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -from typing import Any, Match, Pattern, TextIO, TypeAlias, TypeVar +from re import Match, Pattern +from typing import Any, TextIO, TypeAlias, TypeVar import abc import os diff --git a/bin/tests/system/isctest/name.py b/bin/tests/system/isctest/name.py index e0b23805ac..02b43059a7 100644 --- a/bin/tests/system/isctest/name.py +++ b/bin/tests/system/isctest/name.py @@ -9,7 +9,7 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -from typing import Iterable +from collections.abc import Iterable from dns.name import Name diff --git a/bin/tests/system/isctest/query.py b/bin/tests/system/isctest/query.py index 7c767be167..57af8254c9 100644 --- a/bin/tests/system/isctest/query.py +++ b/bin/tests/system/isctest/query.py @@ -9,7 +9,8 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -from typing import Any, Callable +from collections.abc import Callable +from typing import Any import os import time diff --git a/bin/tests/system/isctest/text.py b/bin/tests/system/isctest/text.py index d305aee775..a60c1bbae3 100644 --- a/bin/tests/system/isctest/text.py +++ b/bin/tests/system/isctest/text.py @@ -11,8 +11,10 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. +from collections.abc import Iterator +from re import Match, Pattern from re import compile as Re -from typing import Iterator, Match, Pattern, TextIO +from typing import TextIO import abc import re diff --git a/bin/tests/system/ixfr-nonminimal/ans2/ans.py b/bin/tests/system/ixfr-nonminimal/ans2/ans.py index aa8b009499..3d2b190c65 100644 --- a/bin/tests/system/ixfr-nonminimal/ans2/ans.py +++ b/bin/tests/system/ixfr-nonminimal/ans2/ans.py @@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ -from typing import AsyncGenerator, Collection, Iterable +from collections.abc import AsyncGenerator, Collection, Iterable import abc diff --git a/bin/tests/system/ixfr-nonminimal/ans4/ans.py b/bin/tests/system/ixfr-nonminimal/ans4/ans.py index 373985aeac..c6bde4cd83 100644 --- a/bin/tests/system/ixfr-nonminimal/ans4/ans.py +++ b/bin/tests/system/ixfr-nonminimal/ans4/ans.py @@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ -from typing import AsyncGenerator, Collection, Iterable +from collections.abc import AsyncGenerator, Collection, Iterable import abc diff --git a/bin/tests/system/ixfr/ans2/ans.py b/bin/tests/system/ixfr/ans2/ans.py index 37b2291721..5c9268a193 100644 --- a/bin/tests/system/ixfr/ans2/ans.py +++ b/bin/tests/system/ixfr/ans2/ans.py @@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ -from typing import AsyncGenerator, Collection, Iterable +from collections.abc import AsyncGenerator, Collection, Iterable import abc diff --git a/bin/tests/system/nsec3-answer/tests_nsec3.py b/bin/tests/system/nsec3-answer/tests_nsec3.py index bed0aadc28..f339813ced 100755 --- a/bin/tests/system/nsec3-answer/tests_nsec3.py +++ b/bin/tests/system/nsec3-answer/tests_nsec3.py @@ -15,9 +15,9 @@ # https://github.com/pylint-dev/pylint/issues/10785#issuecomment-3677224217 # pylint: disable=unreachable +from collections.abc import Container, Iterable from dataclasses import dataclass from pathlib import Path -from typing import Container, Iterable import os diff --git a/bin/tests/system/qmin/ans2/ans.py b/bin/tests/system/qmin/ans2/ans.py index 5d35903da8..a8e7d7cd97 100644 --- a/bin/tests/system/qmin/ans2/ans.py +++ b/bin/tests/system/qmin/ans2/ans.py @@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import dns.name import dns.rcode diff --git a/bin/tests/system/qmin/ans4/ans.py b/bin/tests/system/qmin/ans4/ans.py index 08286a4bba..c3c5547258 100644 --- a/bin/tests/system/qmin/ans4/ans.py +++ b/bin/tests/system/qmin/ans4/ans.py @@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import dns.rcode import dns.rdatatype diff --git a/bin/tests/system/qmin/qmin_ans.py b/bin/tests/system/qmin/qmin_ans.py index 6185e15a10..74c4891b6e 100644 --- a/bin/tests/system/qmin/qmin_ans.py +++ b/bin/tests/system/qmin/qmin_ans.py @@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import abc diff --git a/bin/tests/system/resolver/ans10/ans.py b/bin/tests/system/resolver/ans10/ans.py index e2810e9252..0abb52c54c 100644 --- a/bin/tests/system/resolver/ans10/ans.py +++ b/bin/tests/system/resolver/ans10/ans.py @@ -9,7 +9,7 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import dns.rcode import dns.rdatatype diff --git a/bin/tests/system/resolver/ans2/ans.py b/bin/tests/system/resolver/ans2/ans.py index dc22bdc335..112bf8ac85 100644 --- a/bin/tests/system/resolver/ans2/ans.py +++ b/bin/tests/system/resolver/ans2/ans.py @@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import dns.name import dns.rcode diff --git a/bin/tests/system/resolver/ans3/ans.py b/bin/tests/system/resolver/ans3/ans.py index 36172f7685..8913186a70 100644 --- a/bin/tests/system/resolver/ans3/ans.py +++ b/bin/tests/system/resolver/ans3/ans.py @@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import dns.name import dns.rcode diff --git a/bin/tests/system/resolver/ans8/ans.py b/bin/tests/system/resolver/ans8/ans.py index 6ef65f2157..98929085bc 100644 --- a/bin/tests/system/resolver/ans8/ans.py +++ b/bin/tests/system/resolver/ans8/ans.py @@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import abc diff --git a/bin/tests/system/resolver/resolver_ans.py b/bin/tests/system/resolver/resolver_ans.py index 285cf44b97..e2bf2dc30b 100644 --- a/bin/tests/system/resolver/resolver_ans.py +++ b/bin/tests/system/resolver/resolver_ans.py @@ -11,7 +11,8 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ -from typing import AsyncGenerator, NamedTuple +from collections.abc import AsyncGenerator +from typing import NamedTuple import abc diff --git a/bin/tests/system/rpzrecurse/ans5/ans.py b/bin/tests/system/rpzrecurse/ans5/ans.py index 6eed86d7f4..576f9d0f06 100644 --- a/bin/tests/system/rpzrecurse/ans5/ans.py +++ b/bin/tests/system/rpzrecurse/ans5/ans.py @@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import dns.rcode import dns.rdatatype diff --git a/bin/tests/system/statistics/ans4/ans.py b/bin/tests/system/statistics/ans4/ans.py index 52e0a00d50..dd16e4c471 100644 --- a/bin/tests/system/statistics/ans4/ans.py +++ b/bin/tests/system/statistics/ans4/ans.py @@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import dns.rcode import dns.rdatatype diff --git a/bin/tests/system/tsig/ans2/ans.py b/bin/tests/system/tsig/ans2/ans.py index 677a57cf8f..fe91046d51 100644 --- a/bin/tests/system/tsig/ans2/ans.py +++ b/bin/tests/system/tsig/ans2/ans.py @@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import dns.flags diff --git a/bin/tests/system/xfer/ans9/ans.py b/bin/tests/system/xfer/ans9/ans.py index 269afafe22..25da6b7d43 100644 --- a/bin/tests/system/xfer/ans9/ans.py +++ b/bin/tests/system/xfer/ans9/ans.py @@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import dns.rcode import dns.rdatatype diff --git a/bin/tests/system/zero/ans5/ans.py b/bin/tests/system/zero/ans5/ans.py index ad4a4e3ffd..5ff475d801 100644 --- a/bin/tests/system/zero/ans5/ans.py +++ b/bin/tests/system/zero/ans5/ans.py @@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional information regarding copyright ownership. """ -from typing import AsyncGenerator +from collections.abc import AsyncGenerator import ipaddress diff --git a/pyproject.toml b/pyproject.toml index 916b886cda..308c127568 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,6 +101,7 @@ lint.select = [ # unnecessary `typing` imports "UP006", "UP007", + "UP035", "UP045", # f-strings "UP031",