mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 14:01:55 +08:00
Use PEP 604 syntax wherever possible, part II (#7514)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from types import CodeType, FrameType, FunctionType, MethodType, ModuleType, TracebackType
|
||||
from typing import Any, AnyStr, Callable, NamedTuple, Optional, Sequence, Union
|
||||
from typing import Any, AnyStr, Callable, NamedTuple, Sequence, Union
|
||||
|
||||
# Types and members
|
||||
class EndOfBlock(Exception): ...
|
||||
@@ -106,7 +106,7 @@ class Traceback(NamedTuple):
|
||||
code_context: list[str] | None
|
||||
index: int | None # type: ignore[assignment]
|
||||
|
||||
_FrameInfo = tuple[FrameType, str, int, str, Optional[list[str]], Optional[int]]
|
||||
_FrameInfo = tuple[FrameType, str, int, str, list[str] | None, int | None]
|
||||
|
||||
def getouterframes(frame: FrameType, context: int = ...) -> list[_FrameInfo]: ...
|
||||
def getframeinfo(frame: FrameType | TracebackType, context: int = ...) -> Traceback: ...
|
||||
|
||||
Reference in New Issue
Block a user