mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-26 04:46:46 +08:00
Assorted fixes to stubs
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Stubs for inspect
|
||||
|
||||
from typing import Any, Tuple, List, Callable
|
||||
from typing import Any, Tuple, List, Dict, Callable
|
||||
from types import FrameType
|
||||
|
||||
_object = object
|
||||
@@ -31,4 +31,16 @@ class ArgSpec(tuple):
|
||||
|
||||
def getargspec(func: object) -> ArgSpec: ...
|
||||
|
||||
# namedtuple('FullArgSpec', 'args varargs varkw defaults kwonlyargs kwonlydefaults annotations')
|
||||
class FullArgSpec(tuple):
|
||||
args = ... # type: List[str]
|
||||
varargs = ... # type: str
|
||||
varkw = ... # type: str
|
||||
defaults = ... # type: tuple
|
||||
kwonlyargs = ... # type: List[str]
|
||||
kwonlydefaults = ... # type: Dict[str, Any]
|
||||
annotations = ... # type: Dict[str, Any]
|
||||
|
||||
def getfullargspec(func: object) -> FullArgSpec: ...
|
||||
|
||||
def stack() -> List[Tuple[FrameType, str, int, str, List[str], int]]: ...
|
||||
|
||||
@@ -61,6 +61,7 @@ class TextWrapper:
|
||||
|
||||
|
||||
def wrap(
|
||||
text: str = ...,
|
||||
width: int = ...,
|
||||
*,
|
||||
initial_indent: str = ...,
|
||||
|
||||
@@ -23,6 +23,12 @@ class Thread:
|
||||
def isDaemon(self) -> bool: ...
|
||||
def setDaemon(self, daemon: bool) -> None: ...
|
||||
|
||||
class local(object):
|
||||
# TODO: allows arbitrary parameters...
|
||||
def __getattr__(self, name: str) -> Any: ...
|
||||
def __setattr__(self, name: str, value: Any) -> None: ...
|
||||
def __delattr__(self, name: str) -> None: ...
|
||||
|
||||
class Event:
|
||||
def is_set(self) -> bool: ...
|
||||
def set(self) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user