mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Replace deprecated typing imports
More specific modules (like collections.abc) can now be used.
Generated with: ruff check --extend-select UP035 --fix
(cherry picked from commit ced002c4ab)
This commit is contained in:
parent
c04b9251aa
commit
6e91738efe
36 changed files with 42 additions and 35 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@ lint.select = [
|
|||
# unnecessary `typing` imports
|
||||
"UP006",
|
||||
"UP007",
|
||||
"UP035",
|
||||
"UP045",
|
||||
# f-strings
|
||||
"UP031",
|
||||
|
|
|
|||
Loading…
Reference in a new issue