File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,11 @@ pathsep: LiteralString
7777defpath : LiteralString
7878devnull : LiteralString
7979
80- def abspath (path : PathLike [AnyStr ] | AnyStr ) -> AnyStr : ...
80+ # Overloads are necessary to work around python/mypy#17952 & python/mypy#11880
81+ @overload
82+ def abspath (path : PathLike [AnyStr ]) -> AnyStr : ...
83+ @overload
84+ def abspath (path : AnyStr ) -> AnyStr : ...
8185@overload
8286def basename (p : PathLike [AnyStr ]) -> AnyStr : ...
8387@overload
@@ -86,8 +90,14 @@ def basename(p: AnyOrLiteralStr) -> AnyOrLiteralStr: ...
8690def dirname (p : PathLike [AnyStr ]) -> AnyStr : ...
8791@overload
8892def dirname (p : AnyOrLiteralStr ) -> AnyOrLiteralStr : ...
89- def expanduser (path : PathLike [AnyStr ] | AnyStr ) -> AnyStr : ...
90- def expandvars (path : PathLike [AnyStr ] | AnyStr ) -> AnyStr : ...
93+ @overload
94+ def expanduser (path : PathLike [AnyStr ]) -> AnyStr : ...
95+ @overload
96+ def expanduser (path : AnyStr ) -> AnyStr : ...
97+ @overload
98+ def expandvars (path : PathLike [AnyStr ]) -> AnyStr : ...
99+ @overload
100+ def expandvars (path : AnyStr ) -> AnyStr : ...
91101@overload
92102def normcase (s : PathLike [AnyStr ]) -> AnyStr : ...
93103@overload
You can’t perform that action at this time.
0 commit comments