mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Backport many Self-related changes to the Python-2 stdlib (#7128)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import datetime
|
||||
import types
|
||||
from _typeshed import Self
|
||||
from abc import ABCMeta, abstractmethod
|
||||
from typing import Any, Callable, Iterable, Iterator, Mapping, NoReturn, Pattern, Sequence, Text, TextIO, TypeVar, Union, overload
|
||||
from typing_extensions import ParamSpec
|
||||
@@ -54,7 +55,7 @@ class _AssertRaisesBaseContext:
|
||||
|
||||
class _AssertRaisesContext(_AssertRaisesBaseContext):
|
||||
exception: Any
|
||||
def __enter__(self) -> _AssertRaisesContext: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, exc_type, exc_value, tb) -> bool: ...
|
||||
|
||||
class TestCase(Testable):
|
||||
|
||||
Reference in New Issue
Block a user