Enable flake8-pyi's Y037 (#9686)

This commit is contained in:
Alex Waygood
2023-02-07 03:01:02 +00:00
committed by GitHub
parent c4c4bee8aa
commit 0ef9c3f8e8
38 changed files with 119 additions and 201 deletions

View File

@@ -1,7 +1,7 @@
from _typeshed import Incomplete, Self
from abc import abstractmethod
from collections.abc import Iterable, Iterator
from typing import SupportsInt, Union, overload
from typing import SupportsInt, overload
from typing_extensions import Literal, SupportsIndex, TypeAlias
from netaddr.core import DictDotLookup
@@ -38,7 +38,7 @@ class BaseIP:
def version(self) -> Literal[4, 6]: ...
_IPAddressAddr: TypeAlias = BaseIP | int | str
_IPNetworkAddr: TypeAlias = Union[IPNetwork, IPAddress, tuple[int, int], str]
_IPNetworkAddr: TypeAlias = IPNetwork | IPAddress | tuple[int, int] | str
class IPAddress(BaseIP):
def __init__(self, addr: _IPAddressAddr, version: Literal[4, 6] | None = ..., flags: int = ...) -> None: ...