mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 14:01:55 +08:00
Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949)
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
from types import FrameType, TracebackType
|
||||
from typing import IO, Any, Callable, Dict, List, Optional, Text, Tuple, Type
|
||||
from typing import IO, Any, Callable, Optional, Text
|
||||
|
||||
_ExcInfo = Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]]
|
||||
_ExcInfo = tuple[Optional[type[BaseException]], Optional[BaseException], Optional[TracebackType]]
|
||||
|
||||
def reset() -> str: ... # undocumented
|
||||
def small(text: str) -> str: ... # undocumented
|
||||
def strong(text: str) -> str: ... # undocumented
|
||||
def grey(text: str) -> str: ... # undocumented
|
||||
def lookup(name: str, frame: FrameType, locals: Dict[str, Any]) -> Tuple[str | None, Any]: ... # undocumented
|
||||
def lookup(name: str, frame: FrameType, locals: dict[str, Any]) -> tuple[str | None, Any]: ... # undocumented
|
||||
def scanvars(
|
||||
reader: Callable[[], bytes], frame: FrameType, locals: Dict[str, Any]
|
||||
) -> List[Tuple[str, str | None, Any]]: ... # undocumented
|
||||
reader: Callable[[], bytes], frame: FrameType, locals: dict[str, Any]
|
||||
) -> list[tuple[str, str | None, Any]]: ... # undocumented
|
||||
def html(einfo: _ExcInfo, context: int = ...) -> str: ...
|
||||
def text(einfo: _ExcInfo, context: int = ...) -> str: ...
|
||||
|
||||
@@ -18,7 +18,7 @@ class Hook: # undocumented
|
||||
def __init__(
|
||||
self, display: int = ..., logdir: Text | None = ..., context: int = ..., file: IO[str] | None = ..., format: str = ...
|
||||
) -> None: ...
|
||||
def __call__(self, etype: Type[BaseException] | None, evalue: BaseException | None, etb: TracebackType | None) -> None: ...
|
||||
def __call__(self, etype: type[BaseException] | None, evalue: BaseException | None, etb: TracebackType | None) -> None: ...
|
||||
def handle(self, info: _ExcInfo | None = ...) -> None: ...
|
||||
|
||||
def handler(info: _ExcInfo | None = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user