mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Remove the rest of Union usages by hand
These require some manual changes.
This commit is contained in:
parent
ce9c9a1a9c
commit
cdb7428431
3 changed files with 6 additions and 4 deletions
|
|
@ -9,7 +9,8 @@
|
|||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
from typing import Any, Match, Optional, Pattern, TextIO, TypeVar, Union
|
||||
|
||||
from typing import Any, Match, Optional, Pattern, TextIO, TypeAlias, TypeVar
|
||||
|
||||
import abc
|
||||
import os
|
||||
|
|
@ -18,7 +19,7 @@ import time
|
|||
from isctest.text import FlexPattern, LineReader, compile_pattern
|
||||
|
||||
T = TypeVar("T")
|
||||
OneOrMore = Union[T, list[T]]
|
||||
OneOrMore: TypeAlias = T | list[T]
|
||||
|
||||
|
||||
class WatchLogException(Exception):
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@
|
|||
# information regarding copyright ownership.
|
||||
|
||||
from re import compile as Re
|
||||
from typing import Iterator, Match, Optional, Pattern, TextIO, Union
|
||||
from typing import Iterator, Match, Optional, Pattern, TextIO
|
||||
|
||||
import abc
|
||||
import re
|
||||
|
||||
FlexPattern = Union[str, Pattern]
|
||||
FlexPattern = str | Pattern
|
||||
|
||||
|
||||
def compile_pattern(string: FlexPattern) -> Pattern:
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ lint.select = [
|
|||
"RUF022",
|
||||
# unnecessary `typing` imports
|
||||
"UP006",
|
||||
"UP007",
|
||||
# f-strings
|
||||
"UP031",
|
||||
"UP032",
|
||||
|
|
|
|||
Loading…
Reference in a new issue