mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Remove bare Incomplete annotations in third-party stubs (#11671)
This commit is contained in:
@@ -25,9 +25,12 @@
|
||||
"stdlib/xml/dom/minidom.pyi",
|
||||
"stdlib/xml/dom/pulldom.pyi",
|
||||
"stdlib/xml/sax",
|
||||
"stubs/aiofiles/aiofiles/tempfile/__init__.pyi",
|
||||
"stubs/aiofiles/aiofiles/tempfile/temptypes.pyi",
|
||||
"stubs/antlr4-python3-runtime",
|
||||
"stubs/aws-xray-sdk",
|
||||
"stubs/beautifulsoup4",
|
||||
"stubs/bleach/bleach/sanitizer.pyi",
|
||||
"stubs/boltons",
|
||||
"stubs/boto",
|
||||
"stubs/braintree",
|
||||
@@ -41,6 +44,7 @@
|
||||
"stubs/Flask-SocketIO",
|
||||
"stubs/fpdf2",
|
||||
"stubs/google-cloud-ndb",
|
||||
"stubs/hdbcli/hdbcli/dbapi.pyi",
|
||||
"stubs/html5lib",
|
||||
"stubs/httplib2",
|
||||
"stubs/humanfriendly",
|
||||
@@ -51,9 +55,13 @@
|
||||
"stubs/ldap3",
|
||||
"stubs/Markdown",
|
||||
"stubs/mysqlclient",
|
||||
"stubs/netaddr/netaddr/core.pyi",
|
||||
"stubs/netaddr/netaddr/ip/__init__.pyi",
|
||||
"stubs/netaddr/netaddr/ip/iana.pyi",
|
||||
"stubs/networkx",
|
||||
"stubs/oauthlib",
|
||||
"stubs/openpyxl",
|
||||
"stubs/parsimonious/parsimonious/nodes.pyi",
|
||||
"stubs/passlib",
|
||||
"stubs/peewee",
|
||||
"stubs/pexpect",
|
||||
|
||||
@@ -24,7 +24,7 @@ class _Namespace(_BaseNamespace, Protocol):
|
||||
): ...
|
||||
def send(
|
||||
self,
|
||||
data: Incomplete,
|
||||
data,
|
||||
to=None,
|
||||
room: str | None = None,
|
||||
skip_sid=None,
|
||||
@@ -65,7 +65,7 @@ class Namespace(_Namespace):
|
||||
) -> _T | tuple[str, int]: ...
|
||||
def send( # type: ignore[override]
|
||||
self,
|
||||
data: Incomplete,
|
||||
data,
|
||||
room: str | None = None,
|
||||
include_self: bool = True,
|
||||
namespace: str | None = None,
|
||||
|
||||
@@ -65,7 +65,7 @@ class PdfStream:
|
||||
def __init__(self, dictionary, buf) -> None: ...
|
||||
def decode(self): ...
|
||||
|
||||
def pdf_repr(x: Incomplete) -> bytes: ...
|
||||
def pdf_repr(x) -> bytes: ...
|
||||
|
||||
class PdfParser:
|
||||
filename: Incomplete
|
||||
|
||||
@@ -11,9 +11,9 @@ class PyAccess(_PixelAccessor):
|
||||
image: Incomplete
|
||||
def __init__(self, img, readonly: bool = False) -> None: ...
|
||||
def __setitem__(self, xy: tuple[int, int], color) -> None: ...
|
||||
def __getitem__(self, xy: tuple[int, int]) -> Incomplete: ...
|
||||
def __getitem__(self, xy: tuple[int, int]): ...
|
||||
def putpixel(self, xy: tuple[int, int], color) -> None: ...
|
||||
def getpixel(self, xy: tuple[int, int]) -> Incomplete: ...
|
||||
def getpixel(self, xy: tuple[int, int]): ...
|
||||
def check_xy(self, xy: tuple[int, int]): ...
|
||||
|
||||
class _PyAccess32_2(PyAccess):
|
||||
|
||||
@@ -17,10 +17,10 @@ class _PixelAccessor(Protocol): # noqa: Y046
|
||||
#
|
||||
# This protocol describes that interface.
|
||||
# TODO: should the color args and getter return types be _Color?
|
||||
def __setitem__(self, xy: tuple[int, int], color: Incomplete, /) -> None: ...
|
||||
def __getitem__(self, xy: tuple[int, int], /) -> Incomplete: ...
|
||||
def putpixel(self, xy: tuple[int, int], color: Incomplete, /) -> None: ...
|
||||
def getpixel(self, xy: tuple[int, int], /) -> Incomplete: ...
|
||||
def __setitem__(self, xy: tuple[int, int], color, /) -> None: ...
|
||||
def __getitem__(self, xy: tuple[int, int], /): ...
|
||||
def putpixel(self, xy: tuple[int, int], color, /) -> None: ...
|
||||
def getpixel(self, xy: tuple[int, int], /): ...
|
||||
|
||||
class _Path:
|
||||
def __getattr__(self, item: str) -> Incomplete: ...
|
||||
|
||||
@@ -256,4 +256,4 @@ def TemporaryDirectory(
|
||||
) -> AiofilesContextManagerTempDir[None, None, AsyncTemporaryDirectory]: ...
|
||||
|
||||
class AiofilesContextManagerTempDir(AiofilesContextManager[_T_co, _T_contra, _V_co]):
|
||||
async def __aenter__(self) -> Incomplete: ...
|
||||
async def __aenter__(self): ...
|
||||
|
||||
@@ -20,8 +20,8 @@ class AsyncSpooledTemporaryFile(AsyncBase[_T]):
|
||||
async def flush(self) -> None: ...
|
||||
async def isatty(self) -> bool: ...
|
||||
# All must return `AnyStr`:
|
||||
async def read(self, n: int = ..., /) -> Incomplete: ...
|
||||
async def readline(self, limit: int | None = ..., /) -> Incomplete: ...
|
||||
async def read(self, n: int = ..., /): ...
|
||||
async def readline(self, limit: int | None = ..., /): ...
|
||||
async def readlines(self, hint: int = ..., /) -> list[Incomplete]: ...
|
||||
# ---
|
||||
async def seek(self, offset: int, whence: int = ...) -> int: ...
|
||||
@@ -38,13 +38,13 @@ class AsyncSpooledTemporaryFile(AsyncBase[_T]):
|
||||
@property
|
||||
def newlines(self) -> str: ...
|
||||
# Both should work with `AnyStr`, like in `tempfile`:
|
||||
async def write(self, s: Incomplete) -> int: ...
|
||||
async def write(self, s) -> int: ...
|
||||
async def writelines(self, iterable: Iterable[Incomplete]) -> None: ...
|
||||
|
||||
class AsyncTemporaryDirectory:
|
||||
async def cleanup(self) -> None: ...
|
||||
@property
|
||||
def name(self) -> Incomplete: ... # should be `AnyStr`
|
||||
def name(self): ... # should be `AnyStr`
|
||||
def __init__(
|
||||
self, file: TemporaryDirectory[Incomplete], loop: AbstractEventLoop | None, executor: Incomplete | None
|
||||
) -> None: ...
|
||||
|
||||
@@ -41,7 +41,7 @@ class NoViableAltException(RecognitionException):
|
||||
offendingToken: Incomplete
|
||||
def __init__(
|
||||
self,
|
||||
recognizer: Incomplete,
|
||||
recognizer,
|
||||
input: Incomplete | None = None,
|
||||
startToken: Incomplete | None = None,
|
||||
offendingToken: Incomplete | None = None,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable, Container, Iterable, Iterator
|
||||
from re import Pattern
|
||||
from typing import Final, Protocol
|
||||
@@ -25,7 +24,7 @@ class NoCssSanitizerWarning(UserWarning): ...
|
||||
|
||||
# A html5lib Filter class
|
||||
class _Filter(Protocol):
|
||||
def __call__(self, *, source: BleachSanitizerFilter) -> Incomplete: ...
|
||||
def __call__(self, *, source: BleachSanitizerFilter): ...
|
||||
|
||||
_AttributeFilter: TypeAlias = Callable[[str, str, str], bool]
|
||||
_AttributeDict: TypeAlias = dict[str, list[str] | _AttributeFilter] | dict[str, list[str]] | dict[str, _AttributeFilter]
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable
|
||||
from typing import Any
|
||||
|
||||
def pdb_on_signal(signalnum: int | None = None) -> None: ...
|
||||
def pdb_on_exception(limit: int = 100) -> None: ...
|
||||
def wrap_trace(
|
||||
obj: Incomplete, hook: Callable[..., Any] = ..., which: str | None = None, events: str | None = None, label: str | None = None
|
||||
) -> Incomplete: ...
|
||||
obj, hook: Callable[..., Any] = ..., which: str | None = None, events: str | None = None, label: str | None = None
|
||||
): ...
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
from binascii import Incomplete
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
class BasePriorityQueue:
|
||||
def __init__(self, **kw) -> None: ...
|
||||
def add(self, task, priority: int | None = None) -> None: ...
|
||||
def remove(self, task) -> None: ...
|
||||
def peek(self, default=...) -> Incomplete: ...
|
||||
def pop(self, default=...) -> Incomplete: ...
|
||||
def peek(self, default=...): ...
|
||||
def pop(self, default=...): ...
|
||||
def __len__(self) -> int: ...
|
||||
|
||||
class HeapPriorityQueue(BasePriorityQueue): ...
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from braintree.attribute_getter import AttributeGetter as AttributeGetter
|
||||
|
||||
class RiskData(AttributeGetter):
|
||||
def __init__(self, attributes: Incomplete) -> None: ...
|
||||
def __init__(self, attributes) -> None: ...
|
||||
|
||||
@@ -66,7 +66,7 @@ class DAVClient:
|
||||
name: str | None = ...,
|
||||
id: str | None = ...,
|
||||
props: Mapping[Incomplete, Incomplete] = ...,
|
||||
**extra: Incomplete,
|
||||
**extra,
|
||||
) -> Calendar: ...
|
||||
def check_dav_support(self) -> str | None: ...
|
||||
def check_cdav_support(self) -> bool: ...
|
||||
|
||||
@@ -33,7 +33,7 @@ class DAVObject:
|
||||
name: str | None = None,
|
||||
id: str | None = None,
|
||||
props: Mapping[Incomplete, Incomplete] | None = None,
|
||||
**extra: Incomplete,
|
||||
**extra,
|
||||
) -> None: ...
|
||||
@property
|
||||
def canonical_url(self) -> str: ...
|
||||
@@ -70,14 +70,10 @@ class Principal(DAVObject):
|
||||
class Calendar(DAVObject):
|
||||
def get_supported_components(self) -> list[Incomplete]: ...
|
||||
def save_with_invites(self, ical: str, attendees, **attendeeoptions) -> None: ...
|
||||
def save_event(
|
||||
self, ical: str | None = None, no_overwrite: bool = False, no_create: bool = False, **ical_data: Incomplete
|
||||
) -> Event: ...
|
||||
def save_todo(
|
||||
self, ical: str | None = None, no_overwrite: bool = False, no_create: bool = False, **ical_data: Incomplete
|
||||
) -> Todo: ...
|
||||
def save_event(self, ical: str | None = None, no_overwrite: bool = False, no_create: bool = False, **ical_data) -> Event: ...
|
||||
def save_todo(self, ical: str | None = None, no_overwrite: bool = False, no_create: bool = False, **ical_data) -> Todo: ...
|
||||
def save_journal(
|
||||
self, ical: str | None = None, no_overwrite: bool = False, no_create: bool = False, **ical_data: Incomplete
|
||||
self, ical: str | None = None, no_overwrite: bool = False, no_create: bool = False, **ical_data
|
||||
) -> Journal: ...
|
||||
add_event = save_event
|
||||
add_todo = save_todo
|
||||
|
||||
@@ -83,7 +83,7 @@ class _CDataBase:
|
||||
def __ne__(self, other): ...
|
||||
def __radd__(self, other): ...
|
||||
def __rsub__(self, other): ...
|
||||
def __setitem__(self, index: SupportsIndex | slice, object: Incomplete) -> None: ...
|
||||
def __setitem__(self, index: SupportsIndex | slice, object) -> None: ...
|
||||
def __sub__(self, other): ...
|
||||
|
||||
@final
|
||||
|
||||
@@ -23,4 +23,4 @@ def get_logger() -> Any: ...
|
||||
def setup_logging() -> None: ...
|
||||
|
||||
# TODO: this needs `types-pytz` and a type-alias
|
||||
def get_timezone_from_tz_string(tz_string: str) -> Incomplete: ...
|
||||
def get_timezone_from_tz_string(tz_string: str): ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import optparse
|
||||
from _typeshed import Incomplete, StrPath, SupportsWrite, Unused
|
||||
from _typeshed import StrPath, SupportsWrite, Unused
|
||||
from collections.abc import Callable, Iterable, Mapping
|
||||
from re import Pattern
|
||||
from typing import Any, Literal, TypeVar
|
||||
@@ -69,47 +69,22 @@ class Reporter:
|
||||
*children: nodes.Node,
|
||||
base_node: nodes.Node = ...,
|
||||
source: str = ...,
|
||||
**kwargs: Incomplete,
|
||||
**kwargs,
|
||||
) -> nodes.system_message: ...
|
||||
def debug(
|
||||
self,
|
||||
message: str | Exception,
|
||||
*children: nodes.Node,
|
||||
base_node: nodes.Node = ...,
|
||||
source: str = ...,
|
||||
**kwargs: Incomplete,
|
||||
self, message: str | Exception, *children: nodes.Node, base_node: nodes.Node = ..., source: str = ..., **kwargs
|
||||
) -> nodes.system_message: ...
|
||||
def info(
|
||||
self,
|
||||
message: str | Exception,
|
||||
*children: nodes.Node,
|
||||
base_node: nodes.Node = ...,
|
||||
source: str = ...,
|
||||
**kwargs: Incomplete,
|
||||
self, message: str | Exception, *children: nodes.Node, base_node: nodes.Node = ..., source: str = ..., **kwargs
|
||||
) -> nodes.system_message: ...
|
||||
def warning(
|
||||
self,
|
||||
message: str | Exception,
|
||||
*children: nodes.Node,
|
||||
base_node: nodes.Node = ...,
|
||||
source: str = ...,
|
||||
**kwargs: Incomplete,
|
||||
self, message: str | Exception, *children: nodes.Node, base_node: nodes.Node = ..., source: str = ..., **kwargs
|
||||
) -> nodes.system_message: ...
|
||||
def error(
|
||||
self,
|
||||
message: str | Exception,
|
||||
*children: nodes.Node,
|
||||
base_node: nodes.Node = ...,
|
||||
source: str = ...,
|
||||
**kwargs: Incomplete,
|
||||
self, message: str | Exception, *children: nodes.Node, base_node: nodes.Node = ..., source: str = ..., **kwargs
|
||||
) -> nodes.system_message: ...
|
||||
def severe(
|
||||
self,
|
||||
message: str | Exception,
|
||||
*children: nodes.Node,
|
||||
base_node: nodes.Node = ...,
|
||||
source: str = ...,
|
||||
**kwargs: Incomplete,
|
||||
self, message: str | Exception, *children: nodes.Node, base_node: nodes.Node = ..., source: str = ..., **kwargs
|
||||
) -> nodes.system_message: ...
|
||||
|
||||
class SystemMessage(ApplicationError):
|
||||
|
||||
@@ -84,4 +84,4 @@ class HTML2FPDF(HTMLParser):
|
||||
def error(self, message: str) -> None: ...
|
||||
|
||||
class HTMLMixin:
|
||||
def __init__(self, *args: Incomplete, **kwargs: Incomplete) -> None: ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
@@ -34,7 +34,7 @@ class Connection:
|
||||
def getaddress(self) -> str: ...
|
||||
def getautocommit(self) -> bool: ...
|
||||
def getclientinfo(self, key: str = ...) -> str | dict[str, str]: ...
|
||||
def getproperty(self, *args: Incomplete, **kwargs: Incomplete) -> Incomplete: ...
|
||||
def getproperty(self, *args, **kwargs): ...
|
||||
def isconnected(self) -> bool: ...
|
||||
def rollback(self) -> None: ...
|
||||
def setautocommit(self, auto: bool = ...) -> None: ...
|
||||
@@ -83,8 +83,8 @@ class Cursor:
|
||||
def prepare(self, operation: str, newcursor: Literal[True]) -> Cursor: ...
|
||||
@overload
|
||||
def prepare(self, operation: str, newcursor: Literal[False]) -> Any: ...
|
||||
def print_message(self, *args: Incomplete, **kwargs: Incomplete) -> Incomplete: ...
|
||||
def parsenamedquery(self, *args: Incomplete, **kwargs: Incomplete) -> Incomplete: ...
|
||||
def print_message(self, *args, **kwargs): ...
|
||||
def parsenamedquery(self, *args, **kwargs): ...
|
||||
def scroll(self, value: int, mode: Literal["absolute", "relative"] = ...) -> None: ...
|
||||
def server_cpu_time(self) -> int: ...
|
||||
def server_memory_usage(self) -> int: ...
|
||||
|
||||
@@ -32,8 +32,8 @@ class _Error(Exception):
|
||||
cause: Incomplete | None = None,
|
||||
context: Sequence[ValidationError] = (),
|
||||
validator_value=...,
|
||||
instance: Incomplete = ...,
|
||||
schema: Incomplete = ...,
|
||||
instance=...,
|
||||
schema=...,
|
||||
schema_path: Sequence[str | int] = (),
|
||||
parent: _Error | None = None,
|
||||
type_checker: _utils.Unset | TypeChecker = ...,
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Hashable
|
||||
from typing import TypeVar
|
||||
|
||||
@@ -22,4 +21,4 @@ _Y = TypeVar("_Y", bound=Hashable, covariant=True)
|
||||
@_dispatch
|
||||
def compose(G: DiGraph[_X], H: DiGraph[_Y]) -> DiGraph[_X | _Y]: ...
|
||||
@_dispatch
|
||||
def union(G: DiGraph[_X], H: DiGraph[_Y], rename: Incomplete = ()) -> DiGraph[_X | _Y]: ...
|
||||
def union(G: DiGraph[_X], H: DiGraph[_Y], rename=()) -> DiGraph[_X | _Y]: ...
|
||||
|
||||
@@ -23,7 +23,7 @@ class Interval:
|
||||
class ConflictPair:
|
||||
left: Incomplete
|
||||
right: Incomplete
|
||||
def __init__(self, left: Incomplete = ..., right: Incomplete = ...) -> None: ...
|
||||
def __init__(self, left=..., right=...) -> None: ...
|
||||
def swap(self) -> None: ...
|
||||
def lowest(self, planarity_state): ...
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class Graph(Collection[_Node]):
|
||||
def __contains__(self, n: object) -> bool: ...
|
||||
def __len__(self) -> int: ...
|
||||
def add_node(self, node_for_adding: _Node, **attr) -> None: ...
|
||||
def add_nodes_from(self, nodes_for_adding: Iterable[_NodePlus[_Node]], **attr: Incomplete) -> None: ...
|
||||
def add_nodes_from(self, nodes_for_adding: Iterable[_NodePlus[_Node]], **attr) -> None: ...
|
||||
def remove_node(self, n: _Node) -> None: ...
|
||||
def remove_nodes_from(self, nodes: Iterable[_Node]) -> None: ...
|
||||
nodes: NodeView[_Node]
|
||||
@@ -55,7 +55,7 @@ class Graph(Collection[_Node]):
|
||||
def add_edge(self, u_of_edge: _Node, v_of_edge: _Node, **attr) -> None: ...
|
||||
def add_edges_from(self, ebunch_to_add: Iterable[_EdgePlus[_Node]], **attr) -> None: ...
|
||||
def add_weighted_edges_from(
|
||||
self, ebunch_to_add: Iterable[tuple[_Node, _Node, Incomplete]], weight: str = "weight", **attr: Incomplete
|
||||
self, ebunch_to_add: Iterable[tuple[_Node, _Node, Incomplete]], weight: str = "weight", **attr
|
||||
) -> None: ...
|
||||
def remove_edge(self, u: _Node, v: _Node) -> None: ...
|
||||
def remove_edges_from(self, ebunch: Iterable[_EdgePlus[_Node]]) -> None: ...
|
||||
@@ -68,7 +68,7 @@ class Graph(Collection[_Node]):
|
||||
def has_edge(self, u: _Node, v: _Node) -> bool: ...
|
||||
def neighbors(self, n: _Node) -> Iterator[_Node]: ...
|
||||
edges: OutEdgeView[_Node]
|
||||
def get_edge_data(self, u: _Node, v: _Node, default: Incomplete = None) -> Mapping[str, Incomplete]: ...
|
||||
def get_edge_data(self, u: _Node, v: _Node, default: Incomplete | None = None) -> Mapping[str, Incomplete]: ...
|
||||
def adjacency(self) -> Iterator[tuple[_Node, Mapping[_Node, Mapping[str, Incomplete]]]]: ...
|
||||
|
||||
degree: DiDegreeView[_Node]
|
||||
|
||||
@@ -15,13 +15,17 @@ class NodeView(Mapping[_Node, dict[str, Any]], AbstractSet[_Node]):
|
||||
def __getitem__(self, n: _Node) -> dict[str, Any]: ...
|
||||
def __contains__(self, n: object) -> bool: ...
|
||||
@overload
|
||||
def __call__(self, data: Literal[False] = False, default: Incomplete = None) -> Iterator[_Node]: ...
|
||||
def __call__(self, data: Literal[False] = False, default: Incomplete | None = None) -> Iterator[_Node]: ...
|
||||
@overload
|
||||
def __call__(self, data: Literal[True] | str, default: Incomplete = None) -> Iterator[tuple[_Node, dict[str, Any]]]: ...
|
||||
def data(self, data: bool | str = True, default: Incomplete = None) -> NodeDataView[_Node]: ...
|
||||
def __call__(
|
||||
self, data: Literal[True] | str, default: Incomplete | None = None
|
||||
) -> Iterator[tuple[_Node, dict[str, Any]]]: ...
|
||||
def data(self, data: bool | str = True, default: Incomplete | None = None) -> NodeDataView[_Node]: ...
|
||||
|
||||
class NodeDataView(AbstractSet[_Node]):
|
||||
def __init__(self, nodedict: Mapping[str, Incomplete], data: bool | str = False, default: Incomplete = None) -> None: ...
|
||||
def __init__(
|
||||
self, nodedict: Mapping[str, Incomplete], data: bool | str = False, default: Incomplete | None = None
|
||||
) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self) -> Iterator[tuple[_Node, Incomplete]]: ... # type: ignore[override]
|
||||
def __contains__(self, n: object) -> bool: ...
|
||||
|
||||
@@ -20,7 +20,7 @@ def to_networkx_graph(
|
||||
@_dispatch
|
||||
def to_dict_of_lists(G: Graph[_Node], nodelist: None | Iterable[_Node] = None) -> dict[_Node, list[_Node]]: ...
|
||||
@_dispatch
|
||||
def from_dict_of_lists(d: dict[_Node, Iterable[_Node]], create_using: Incomplete | None = None) -> Incomplete: ...
|
||||
def from_dict_of_lists(d: dict[_Node, Iterable[_Node]], create_using: Incomplete | None = None): ...
|
||||
def to_dict_of_dicts(G, nodelist=None, edge_data=None) -> dict[Incomplete, Incomplete]: ...
|
||||
@_dispatch
|
||||
def from_dict_of_dicts(d, create_using=None, multigraph_input=False): ...
|
||||
|
||||
@@ -296,7 +296,7 @@ class Default(Typed[_T, _N]): # unused
|
||||
class Alias(Descriptor[Incomplete]):
|
||||
alias: str
|
||||
def __init__(self, alias: str) -> None: ...
|
||||
def __set__(self, instance: Serialisable | Strict, value: Incomplete) -> None: ...
|
||||
def __set__(self, instance: Serialisable | Strict, value) -> None: ...
|
||||
def __get__(self, instance: Serialisable | Strict, cls: Unused): ...
|
||||
|
||||
class MatchPattern(Descriptor[_P], Generic[_P, _N]):
|
||||
|
||||
@@ -22,7 +22,7 @@ class Percentage(MinMax[float, Incomplete]):
|
||||
pattern: str
|
||||
min: float
|
||||
max: float
|
||||
def __set__(self, instance: Serialisable | Strict, value: Incomplete) -> None: ...
|
||||
def __set__(self, instance: Serialisable | Strict, value) -> None: ...
|
||||
|
||||
class Extension(Serialisable):
|
||||
uri: String[Literal[False]]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from _typeshed import ConvertibleToInt, Incomplete, Unused
|
||||
from _typeshed import ConvertibleToInt, Unused
|
||||
from re import Pattern
|
||||
from typing import Final, Literal, overload
|
||||
from typing_extensions import Self
|
||||
@@ -22,7 +22,7 @@ class ColRange(Strict):
|
||||
@overload
|
||||
def __init__(self, range_string: None = None, *, min_col: str, max_col: str) -> None: ...
|
||||
@overload
|
||||
def __init__(self, range_string: Incomplete, min_col: Unused = None, max_col: Unused = None) -> None: ...
|
||||
def __init__(self, range_string, min_col: Unused = None, max_col: Unused = None) -> None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
class RowRange(Strict):
|
||||
@@ -31,7 +31,7 @@ class RowRange(Strict):
|
||||
@overload
|
||||
def __init__(self, range_string: None, min_row: ConvertibleToInt, max_row: ConvertibleToInt) -> None: ...
|
||||
@overload
|
||||
def __init__(self, range_string: Incomplete, min_row: Unused = None, max_row: Unused = None) -> None: ...
|
||||
def __init__(self, range_string, min_row: Unused = None, max_row: Unused = None) -> None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
class PrintTitles(Strict):
|
||||
|
||||
@@ -108,7 +108,7 @@ def tostring(
|
||||
doctype: str = ...,
|
||||
exclusive: bool = ...,
|
||||
with_comments: bool = ...,
|
||||
inclusive_ns_prefixes: Incomplete = ...,
|
||||
inclusive_ns_prefixes=...,
|
||||
) -> bytes: ...
|
||||
|
||||
# from xml.etree.ElementTree import iterparse
|
||||
|
||||
@@ -36,7 +36,7 @@ class NodeVisitor(Generic[_VisitResultT], metaclass=RuleDecoratorMeta):
|
||||
grammar: Grammar | Incomplete
|
||||
unwrapped_exceptions: tuple[type[BaseException], ...]
|
||||
def visit(self, node: Node) -> _VisitResultT: ...
|
||||
def generic_visit(self, node: Node, visited_children: Sequence[Any]) -> Incomplete: ...
|
||||
def generic_visit(self, node: Node, visited_children: Sequence[Any]): ...
|
||||
def parse(self, text: str, pos: int = 0) -> _VisitResultT: ...
|
||||
def match(self, text: str, pos: int = 0) -> _VisitResultT: ...
|
||||
def lift_child(self, node: Node, children: Sequence[_ChildT]) -> _ChildT: ...
|
||||
|
||||
Reference in New Issue
Block a user