mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-21 02:22:07 +08:00
inspect: various fixes (#3757)
* inspect: fix BlockFinder.tokeneater args * inspect: fix formatargspec * inspect: fix formatargvalues * inspect: fix various arg names * inspect: update whitelists
This commit is contained in:
@@ -21,8 +21,8 @@ class BlockFinder:
|
||||
indecorator: bool
|
||||
decoratorhasargs: bool
|
||||
last: int
|
||||
def tokeneater(self, type: int, token: str, srow_scol: Tuple[int, int],
|
||||
erow_ecol: Tuple[int, int], line: str) -> None: ...
|
||||
def tokeneater(self, type: int, token: str, srowcol: Tuple[int, int],
|
||||
erowcol: Tuple[int, int], line: str) -> None: ...
|
||||
|
||||
CO_OPTIMIZED: int
|
||||
CO_NEWLOCALS: int
|
||||
@@ -97,7 +97,7 @@ def indentsize(line: str) -> int: ...
|
||||
#
|
||||
# Introspecting callables with the Signature object
|
||||
#
|
||||
def signature(callable: Callable[..., Any],
|
||||
def signature(obj: Callable[..., Any],
|
||||
*,
|
||||
follow_wrapped: bool = ...) -> Signature: ...
|
||||
|
||||
@@ -211,7 +211,7 @@ def formatargspec(args: List[str],
|
||||
varargs: Optional[str] = ...,
|
||||
varkw: Optional[str] = ...,
|
||||
defaults: Optional[Tuple[Any, ...]] = ...,
|
||||
kwonlyargs: Optional[List[str]] = ...,
|
||||
kwonlyargs: Optional[Sequence[str]] = ...,
|
||||
kwonlydefaults: Optional[Dict[str, Any]] = ...,
|
||||
annotations: Dict[str, Any] = ...,
|
||||
formatarg: Callable[[str], str] = ...,
|
||||
@@ -219,12 +219,12 @@ def formatargspec(args: List[str],
|
||||
formatvarkw: Callable[[str], str] = ...,
|
||||
formatvalue: Callable[[Any], str] = ...,
|
||||
formatreturns: Callable[[Any], str] = ...,
|
||||
formatannotations: Callable[[Any], str] = ...,
|
||||
formatannotation: Callable[[Any], str] = ...,
|
||||
) -> str: ...
|
||||
def formatargvalues(args: List[str],
|
||||
varargs: Optional[str] = ...,
|
||||
varkw: Optional[str] = ...,
|
||||
locals: Optional[Dict[str, Any]] = ...,
|
||||
varargs: Optional[str],
|
||||
varkw: Optional[str],
|
||||
locals: Optional[Dict[str, Any]],
|
||||
formatarg: Optional[Callable[[str], str]] = ...,
|
||||
formatvarargs: Optional[Callable[[str], str]] = ...,
|
||||
formatvarkw: Optional[Callable[[str], str]] = ...,
|
||||
@@ -232,7 +232,7 @@ def formatargvalues(args: List[str],
|
||||
) -> str: ...
|
||||
def getmro(cls: type) -> Tuple[type, ...]: ...
|
||||
|
||||
def getcallargs(func: Callable[..., Any],
|
||||
def getcallargs(__func: Callable[..., Any],
|
||||
*args: Any,
|
||||
**kwds: Any) -> Dict[str, Any]: ...
|
||||
|
||||
@@ -269,7 +269,7 @@ class FrameInfo(NamedTuple):
|
||||
|
||||
def getframeinfo(frame: Union[FrameType, TracebackType], context: int = ...) -> Traceback: ...
|
||||
def getouterframes(frame: Any, context: int = ...) -> List[FrameInfo]: ...
|
||||
def getinnerframes(traceback: TracebackType, context: int = ...) -> List[FrameInfo]: ...
|
||||
def getinnerframes(tb: TracebackType, context: int = ...) -> List[FrameInfo]: ...
|
||||
def getlineno(frame: FrameType) -> int: ...
|
||||
def currentframe() -> Optional[FrameType]: ...
|
||||
def stack(context: int = ...) -> List[FrameInfo]: ...
|
||||
|
||||
@@ -113,7 +113,6 @@ http.client.HTTPSConnection.__init__
|
||||
http.cookiejar.DefaultCookiePolicy.__init__
|
||||
http.server.SimpleHTTPRequestHandler.__init__
|
||||
importlib.metadata.EntryPointBase
|
||||
inspect.getcallargs
|
||||
inspect.isasyncgenfunction
|
||||
inspect.iscoroutinefunction
|
||||
inspect.isgeneratorfunction
|
||||
|
||||
@@ -352,17 +352,12 @@ importlib.machinery.WindowsRegistryFinder.find_module
|
||||
importlib.machinery.WindowsRegistryFinder.find_spec
|
||||
importlib.util.spec_from_file_location
|
||||
importlib.util.spec_from_loader
|
||||
inspect.BlockFinder.tokeneater
|
||||
inspect.Parameter.__init__
|
||||
inspect.Parameter.replace
|
||||
inspect.Signature.__init__
|
||||
inspect.Signature.replace
|
||||
inspect.formatargspec
|
||||
inspect.formatargvalues
|
||||
inspect.getabsfile
|
||||
inspect.getinnerframes
|
||||
inspect.getmodule
|
||||
inspect.signature
|
||||
io.BufferedRandom.truncate
|
||||
io.BufferedReader.seek
|
||||
io.BufferedReader.truncate
|
||||
|
||||
Reference in New Issue
Block a user