A few linux stubtest fixes (#5381)

This commit is contained in:
hatal175
2021-05-08 22:49:42 +03:00
committed by GitHub
parent 9cdd5220c2
commit 653191e514
3 changed files with 9 additions and 19 deletions

View File

@@ -52,18 +52,10 @@ def normcase(s: AnyStr) -> AnyStr: ...
def normpath(path: PathLike[AnyStr]) -> AnyStr: ...
@overload
def normpath(path: AnyStr) -> AnyStr: ...
if sys.platform == "win32":
@overload
def realpath(path: PathLike[AnyStr]) -> AnyStr: ...
@overload
def realpath(path: AnyStr) -> AnyStr: ...
else:
@overload
def realpath(filename: PathLike[AnyStr]) -> AnyStr: ...
@overload
def realpath(filename: AnyStr) -> AnyStr: ...
@overload
def realpath(path: PathLike[AnyStr]) -> AnyStr: ...
@overload
def realpath(path: AnyStr) -> AnyStr: ...
# In reality it returns str for sequences of StrPath and bytes for sequences
# of BytesPath, but mypy does not accept such a signature.