Use TypeAlias for type aliases where possible, part II (#7667)

This commit is contained in:
Alex Waygood
2022-04-20 20:02:47 +01:00
committed by GitHub
parent c653be73b8
commit b093c90a94
41 changed files with 91 additions and 90 deletions

View File

@@ -2,7 +2,7 @@ import bz2
import io
import sys
from _typeshed import Self, StrOrBytesPath, StrPath
from builtins import type as Type # alias to avoid name clashes with fields named "type"
from builtins import list as _list, type as Type # aliases to avoid name clashes with fields named "type" or "list"
from collections.abc import Callable, Iterable, Iterator, Mapping
from gzip import _ReadableFileobj as _GzipReadableFileobj, _WritableFileobj as _GzipWritableFileobj
from types import TracebackType
@@ -109,8 +109,6 @@ def open(
class ExFileObject(io.BufferedReader):
def __init__(self, tarfile: TarFile, tarinfo: TarInfo) -> None: ...
_list = list # conflicts with method name
class TarFile:
OPEN_METH: Mapping[str, str]
name: StrOrBytesPath | None