Use lowercase type everywhere (#6853)

This commit is contained in:
Alex Waygood
2022-01-08 15:09:29 +00:00
committed by GitHub
parent f8501d33c7
commit a40d79a4e6
172 changed files with 728 additions and 761 deletions

View File

@@ -2,7 +2,7 @@ import os
import sys
from _typeshed import Self
from types import TracebackType
from typing import IO, Any, AnyStr, Generic, Iterable, Iterator, Type, Union, overload
from typing import IO, Any, AnyStr, Generic, Iterable, Iterator, Union, overload
from typing_extensions import Literal
if sys.version_info >= (3, 9):
@@ -169,7 +169,7 @@ class _TemporaryFileWrapper(Generic[AnyStr], IO[AnyStr]):
delete: bool
def __init__(self, file: IO[AnyStr], name: str, delete: bool = ...) -> None: ...
def __enter__(self: Self) -> Self: ...
def __exit__(self, exc: Type[BaseException] | None, value: BaseException | None, tb: TracebackType | None) -> bool | None: ...
def __exit__(self, exc: type[BaseException] | None, value: BaseException | None, tb: TracebackType | None) -> bool | None: ...
def __getattr__(self, name: str) -> Any: ...
def close(self) -> None: ...
# These methods don't exist directly on this object, but
@@ -293,7 +293,7 @@ class SpooledTemporaryFile(IO[AnyStr]):
def rollover(self) -> None: ...
def __enter__(self: Self) -> Self: ...
def __exit__(
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
) -> bool | None: ...
# These methods are copied from the abstract methods of IO, because
# SpooledTemporaryFile implements IO.
@@ -346,7 +346,7 @@ class TemporaryDirectory(Generic[AnyStr]):
def cleanup(self) -> None: ...
def __enter__(self) -> AnyStr: ...
def __exit__(
self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
) -> None: ...
if sys.version_info >= (3, 9):
def __class_getitem__(cls, item: Any) -> GenericAlias: ...