mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Use typing_extensions.Self in the stdlib (#9694)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import sys
|
||||
from _typeshed import Self, SupportsWrite
|
||||
from _typeshed import SupportsWrite
|
||||
from collections.abc import Generator, Iterable, Iterator, Mapping
|
||||
from types import FrameType, TracebackType
|
||||
from typing import Any, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
|
||||
__all__ = [
|
||||
"extract_stack",
|
||||
@@ -129,7 +129,7 @@ class TracebackException:
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
def from_exception(
|
||||
cls: type[Self],
|
||||
cls,
|
||||
exc: BaseException,
|
||||
*,
|
||||
limit: int | None = ...,
|
||||
@@ -154,7 +154,7 @@ class TracebackException:
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
def from_exception(
|
||||
cls: type[Self],
|
||||
cls,
|
||||
exc: BaseException,
|
||||
*,
|
||||
limit: int | None = ...,
|
||||
@@ -176,7 +176,7 @@ class TracebackException:
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
def from_exception(
|
||||
cls: type[Self], exc: BaseException, *, limit: int | None = ..., lookup_lines: bool = ..., capture_locals: bool = ...
|
||||
cls, exc: BaseException, *, limit: int | None = ..., lookup_lines: bool = ..., capture_locals: bool = ...
|
||||
) -> Self: ...
|
||||
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user