mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
Remove bare incompletes (#11670)
This commit is contained in:
@@ -11,19 +11,28 @@
|
||||
"stdlib/distutils/command",
|
||||
"stdlib/distutils/dist.pyi",
|
||||
"stdlib/importlib/readers.pyi",
|
||||
"stdlib/importlib/resources/simple.pyi",
|
||||
"stdlib/lib2to3/fixes/*.pyi",
|
||||
"stdlib/multiprocessing/resource_tracker.pyi",
|
||||
"stdlib/multiprocessing/util.pyi",
|
||||
"stdlib/numbers.pyi",
|
||||
"stdlib/optparse.pyi",
|
||||
"stdlib/_tkinter.pyi",
|
||||
"stdlib/tkinter/__init__.pyi",
|
||||
"stdlib/tkinter/commondialog.pyi",
|
||||
"stdlib/tkinter/filedialog.pyi",
|
||||
"stdlib/tkinter/dialog.pyi",
|
||||
"stdlib/tkinter/messagebox.pyi",
|
||||
"stdlib/tkinter/scrolledtext.pyi",
|
||||
"stdlib/tkinter/tix.pyi",
|
||||
"stdlib/tkinter/ttk.pyi",
|
||||
"stdlib/typing.pyi",
|
||||
"stdlib/typing_extensions.pyi",
|
||||
"stdlib/xml/dom/NodeFilter.pyi",
|
||||
"stdlib/xml/dom/expatbuilder.pyi",
|
||||
"stdlib/xml/dom/minidom.pyi",
|
||||
"stdlib/xml/dom/pulldom.pyi",
|
||||
"stdlib/xml/dom/xmlbuilder.pyi",
|
||||
"stdlib/xml/sax",
|
||||
"stubs/aiofiles/aiofiles/tempfile/__init__.pyi",
|
||||
"stubs/aiofiles/aiofiles/tempfile/temptypes.pyi",
|
||||
|
||||
@@ -28,11 +28,11 @@ if sys.version_info >= (3, 11):
|
||||
def is_file(self) -> Literal[True]: ...
|
||||
def is_dir(self) -> Literal[False]: ...
|
||||
@overload
|
||||
def open(self, mode: OpenTextMode = "r", *args: Incomplete, **kwargs: Incomplete) -> TextIOWrapper: ...
|
||||
def open(self, mode: OpenTextMode = "r", *args, **kwargs) -> TextIOWrapper: ...
|
||||
@overload
|
||||
def open(self, mode: OpenBinaryMode, *args: Unused, **kwargs: Unused) -> BinaryIO: ...
|
||||
@overload
|
||||
def open(self, mode: str, *args: Incomplete, **kwargs: Incomplete) -> IO[Any]: ...
|
||||
def open(self, mode: str, *args: Incomplete, **kwargs) -> IO[Any]: ...
|
||||
def joinpath(self, name: Never) -> NoReturn: ... # type: ignore[override]
|
||||
|
||||
class ResourceContainer(Traversable, metaclass=abc.ABCMeta):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from _typeshed import FileDescriptorOrPath, Incomplete
|
||||
from _typeshed import FileDescriptorOrPath
|
||||
from collections.abc import Sized
|
||||
|
||||
__all__ = ["ensure_running", "register", "unregister"]
|
||||
@@ -6,8 +6,8 @@ __all__ = ["ensure_running", "register", "unregister"]
|
||||
class ResourceTracker:
|
||||
def getfd(self) -> int | None: ...
|
||||
def ensure_running(self) -> None: ...
|
||||
def register(self, name: Sized, rtype: Incomplete) -> None: ...
|
||||
def unregister(self, name: Sized, rtype: Incomplete) -> None: ...
|
||||
def register(self, name: Sized, rtype) -> None: ...
|
||||
def unregister(self, name: Sized, rtype) -> None: ...
|
||||
|
||||
_resource_tracker: ResourceTracker
|
||||
ensure_running = _resource_tracker.ensure_running
|
||||
|
||||
@@ -42,7 +42,7 @@ def is_abstract_socket_namespace(address: str | bytes | None) -> bool: ...
|
||||
abstract_sockets_supported: bool
|
||||
|
||||
def get_temp_dir() -> str: ...
|
||||
def register_after_fork(obj: Incomplete, func: Callable[[Incomplete], object]) -> None: ...
|
||||
def register_after_fork(obj, func: Callable[[Incomplete], object]) -> None: ...
|
||||
|
||||
class Finalize:
|
||||
def __init__(
|
||||
@@ -59,7 +59,7 @@ class Finalize:
|
||||
_finalizer_registry: MutableMapping[Incomplete, Incomplete] = {},
|
||||
sub_debug: Callable[..., object] = ...,
|
||||
getpid: Callable[[], int] = ...,
|
||||
) -> Incomplete: ...
|
||||
): ...
|
||||
def cancel(self) -> None: ...
|
||||
def still_active(self) -> bool: ...
|
||||
|
||||
|
||||
@@ -10,5 +10,5 @@ class Dialog:
|
||||
command: ClassVar[str | None]
|
||||
master: Incomplete | None
|
||||
options: Mapping[str, Incomplete]
|
||||
def __init__(self, master: Incomplete | None = None, **options: Incomplete) -> None: ...
|
||||
def show(self, **options: Incomplete) -> Incomplete: ...
|
||||
def __init__(self, master: Incomplete | None = None, **options) -> None: ...
|
||||
def show(self, **options): ...
|
||||
|
||||
@@ -12,5 +12,5 @@ DIALOG_ICON: str
|
||||
class Dialog(Widget):
|
||||
widgetName: str
|
||||
num: int
|
||||
def __init__(self, master: Incomplete | None = None, cnf: Mapping[str, Any] = {}, **kw: Incomplete) -> None: ...
|
||||
def __init__(self, master: Incomplete | None = None, cnf: Mapping[str, Any] = {}, **kw) -> None: ...
|
||||
def destroy(self) -> None: ...
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from _typeshed import Incomplete
|
||||
from tkinter import Frame, Misc, Scrollbar, Text
|
||||
|
||||
__all__ = ["ScrolledText"]
|
||||
@@ -7,4 +6,4 @@ __all__ = ["ScrolledText"]
|
||||
class ScrolledText(Text):
|
||||
frame: Frame
|
||||
vbar: Scrollbar
|
||||
def __init__(self, master: Misc | None = None, **kwargs: Incomplete) -> None: ...
|
||||
def __init__(self, master: Misc | None = None, **kwargs) -> None: ...
|
||||
|
||||
@@ -6,7 +6,7 @@ import collections # noqa: F401 # pyright: ignore
|
||||
import sys
|
||||
import typing_extensions
|
||||
from _collections_abc import dict_items, dict_keys, dict_values
|
||||
from _typeshed import IdentityFunction, Incomplete, ReadableBuffer, SupportsKeysAndGetItem
|
||||
from _typeshed import IdentityFunction, ReadableBuffer, SupportsKeysAndGetItem
|
||||
from abc import ABCMeta, abstractmethod
|
||||
from contextlib import AbstractAsyncContextManager, AbstractContextManager
|
||||
from re import Match as Match, Pattern as Pattern
|
||||
@@ -170,7 +170,7 @@ class TypeVar:
|
||||
def __or__(self, right: Any) -> _SpecialForm: ...
|
||||
def __ror__(self, left: Any) -> _SpecialForm: ...
|
||||
if sys.version_info >= (3, 11):
|
||||
def __typing_subst__(self, arg: Incomplete) -> Incomplete: ...
|
||||
def __typing_subst__(self, arg): ...
|
||||
|
||||
# Used for an undocumented mypy feature. Does not exist at runtime.
|
||||
_promote = object()
|
||||
@@ -221,7 +221,7 @@ if sys.version_info >= (3, 11):
|
||||
def __init__(self, name: str) -> None: ...
|
||||
def __iter__(self) -> Any: ...
|
||||
def __typing_subst__(self, arg: Never) -> Never: ...
|
||||
def __typing_prepare_subst__(self, alias: Incomplete, args: Incomplete) -> Incomplete: ...
|
||||
def __typing_prepare_subst__(self, alias, args): ...
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
@final
|
||||
@@ -270,8 +270,8 @@ if sys.version_info >= (3, 10):
|
||||
@property
|
||||
def kwargs(self) -> ParamSpecKwargs: ...
|
||||
if sys.version_info >= (3, 11):
|
||||
def __typing_subst__(self, arg: Incomplete) -> Incomplete: ...
|
||||
def __typing_prepare_subst__(self, alias: Incomplete, args: Incomplete) -> Incomplete: ...
|
||||
def __typing_subst__(self, arg): ...
|
||||
def __typing_prepare_subst__(self, alias, args): ...
|
||||
|
||||
def __or__(self, right: Any) -> _SpecialForm: ...
|
||||
def __ror__(self, left: Any) -> _SpecialForm: ...
|
||||
|
||||
@@ -2,7 +2,7 @@ import abc
|
||||
import sys
|
||||
import typing
|
||||
from _collections_abc import dict_items, dict_keys, dict_values
|
||||
from _typeshed import IdentityFunction, Incomplete
|
||||
from _typeshed import IdentityFunction
|
||||
from typing import ( # noqa: Y022,Y037,Y038,Y039
|
||||
IO as IO,
|
||||
TYPE_CHECKING as TYPE_CHECKING,
|
||||
@@ -413,7 +413,7 @@ class TypeVar:
|
||||
def __or__(self, right: Any) -> _SpecialForm: ...
|
||||
def __ror__(self, left: Any) -> _SpecialForm: ...
|
||||
if sys.version_info >= (3, 11):
|
||||
def __typing_subst__(self, arg: Incomplete) -> Incomplete: ...
|
||||
def __typing_subst__(self, arg): ...
|
||||
|
||||
@final
|
||||
class ParamSpec:
|
||||
|
||||
@@ -60,7 +60,7 @@ class DOMBuilder:
|
||||
def supportsFeature(self, name: str) -> bool: ...
|
||||
def canSetFeature(self, name: str, state: int) -> bool: ...
|
||||
# getFeature could return any attribute from an instance of `Options`
|
||||
def getFeature(self, name: str) -> Incomplete: ...
|
||||
def getFeature(self, name: str): ...
|
||||
def parseURI(self, uri: str) -> ExpatBuilder | ExpatBuilderNS: ...
|
||||
def parse(self, input: DOMInputSource) -> ExpatBuilder | ExpatBuilderNS: ...
|
||||
# `input` and `cnode` argtypes for `parseWithContext` are unknowable
|
||||
|
||||
Reference in New Issue
Block a user