Remove bare Incomplete annotations in third-party stubs (#11671)

This commit is contained in:
Sebastian Rittau
2024-03-31 03:34:51 +02:00
committed by GitHub
parent 6cb57b5f26
commit 33de88879f
33 changed files with 76 additions and 99 deletions

View File

@@ -1,4 +1,4 @@
from _typeshed import Incomplete, SupportsWrite
from _typeshed import SupportsWrite
from collections.abc import Iterator, Mapping
from typing import Final
@@ -13,7 +13,7 @@ class AddrConversionError(Exception): ...
class NotRegisteredError(Exception): ...
class Subscriber:
def update(self, data: Incomplete) -> None: ...
def update(self, data) -> None: ...
class PrettyPrinter(Subscriber):
fh: SupportsWrite[str]

View File

@@ -1,4 +1,4 @@
from _typeshed import ConvertibleToInt, Incomplete, Unused
from _typeshed import ConvertibleToInt, Unused
from abc import abstractmethod
from collections.abc import Iterable, Iterator
from typing import Literal, SupportsIndex, SupportsInt, overload
@@ -92,7 +92,7 @@ class IPListMixin:
def __contains__(self, other: BaseIP | _IPAddressAddr) -> bool: ...
def __bool__(self) -> Literal[True]: ...
def parse_ip_network(module: Incomplete, addr: tuple[int, int] | str, flags: int = 0) -> tuple[int, int]: ...
def parse_ip_network(module, addr: tuple[int, int] | str, flags: int = 0) -> tuple[int, int]: ...
class IPNetwork(BaseIP, IPListMixin):
def __init__(self, addr: _IPNetworkAddr, version: Literal[4, 6] | None = None, flags: int = 0) -> None: ...

View File

@@ -21,7 +21,7 @@ class SaxRecordParser(handler.ContentHandler):
class XMLRecordParser(Publisher):
xmlparser: XMLReader
fh: Incomplete
def __init__(self, fh: Incomplete, **kwargs: object) -> None: ...
def __init__(self, fh, **kwargs: object) -> None: ...
def process_record(self, rec: Mapping[str, object]) -> dict[str, str] | None: ...
def consume_record(self, rec: object) -> None: ...
def parse(self) -> None: ...
@@ -45,7 +45,7 @@ class DictUpdater(Subscriber):
topic: str
unique_key: str
def __init__(self, dct: MutableMapping[_IanaInfoKey, Incomplete], topic: str, unique_key: str) -> None: ...
def update(self, data: Incomplete) -> None: ...
def update(self, data) -> None: ...
def load_info() -> None: ...
def pprint_info(fh: SupportsWrite[str] | None = None) -> None: ...