Skip to content

Commit

Permalink
[1.12 backport] revert os.path change (#17995)
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja authored Oct 18, 2024
1 parent 71e1f05 commit 346e370
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions mypy/typeshed/stdlib/posixpath.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ pathsep: LiteralString
defpath: LiteralString
devnull: LiteralString

def abspath(path: PathLike[AnyStr] | AnyStr) -> AnyStr: ...
# Overloads are necessary to work around python/mypy#17952 & python/mypy#11880
@overload
def abspath(path: PathLike[AnyStr]) -> AnyStr: ...
@overload
def abspath(path: AnyStr) -> AnyStr: ...
@overload
def basename(p: PathLike[AnyStr]) -> AnyStr: ...
@overload
Expand All @@ -86,8 +90,14 @@ def basename(p: AnyOrLiteralStr) -> AnyOrLiteralStr: ...
def dirname(p: PathLike[AnyStr]) -> AnyStr: ...
@overload
def dirname(p: AnyOrLiteralStr) -> AnyOrLiteralStr: ...
def expanduser(path: PathLike[AnyStr] | AnyStr) -> AnyStr: ...
def expandvars(path: PathLike[AnyStr] | AnyStr) -> AnyStr: ...
@overload
def expanduser(path: PathLike[AnyStr]) -> AnyStr: ...
@overload
def expanduser(path: AnyStr) -> AnyStr: ...
@overload
def expandvars(path: PathLike[AnyStr]) -> AnyStr: ...
@overload
def expandvars(path: AnyStr) -> AnyStr: ...
@overload
def normcase(s: PathLike[AnyStr]) -> AnyStr: ...
@overload
Expand Down

0 comments on commit 346e370

Please sign in to comment.