Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions

View File

@@ -14,14 +14,14 @@ from genericpath import (
samestat as samestat,
)
from os import PathLike
from typing import AnyStr, Optional, Sequence, Tuple, overload
from typing import AnyStr, Sequence, Tuple, overload
supports_unicode_filenames: bool
# aliases (also in os)
curdir: str
pardir: str
sep: str
altsep: Optional[str]
altsep: str | None
extsep: str
pathsep: str
defpath: str
@@ -78,9 +78,9 @@ else:
def realpath(filename: AnyStr) -> AnyStr: ...
@overload
def relpath(path: BytesPath, start: Optional[BytesPath] = ...) -> bytes: ...
def relpath(path: BytesPath, start: BytesPath | None = ...) -> bytes: ...
@overload
def relpath(path: StrPath, start: Optional[StrPath] = ...) -> str: ...
def relpath(path: StrPath, start: StrPath | None = ...) -> str: ...
@overload
def split(p: PathLike[AnyStr]) -> Tuple[AnyStr, AnyStr]: ...
@overload