Always use TypeAlias when assigning to Any (#8021)

This commit is contained in:
Alex Waygood
2022-06-06 02:16:20 +01:00
committed by GitHub
parent a2ba0c8a00
commit 43a9ab08d7
17 changed files with 65 additions and 45 deletions

View File

@@ -440,7 +440,13 @@ class _SpecState:
def mock_open(mock: Any | None = ..., read_data: Any = ...) -> Any: ...
PropertyMock = Any
class PropertyMock(Mock):
if sys.version_info >= (3, 8):
def __get__(self: Self, obj: _T, obj_type: type[_T] | None = ...) -> Self: ...
else:
def __get__(self: Self, obj: _T, obj_type: type[_T] | None) -> Self: ...
def __set__(self, obj: Any, value: Any) -> None: ...
if sys.version_info >= (3, 7):
def seal(mock: Any) -> None: ...