mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-31 00:24:24 +08:00
keep os.path in 2 and 3 consistent (#2152)
We can't merge these because os/__init__ is still different. Also slight refactor of tests/check_consistent.py to avoid `from os import path`.
This commit is contained in:
committed by
Guido van Rossum
parent
d84069e78d
commit
b89f9553e9
@@ -1,3 +1,4 @@
|
||||
# NB: path.pyi and stdlib/2 and stdlib/3 must remain consistent!
|
||||
# Stubs for os.path
|
||||
# Ron Murawski <ron@horizonchess.com>
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# NB: path.pyi and stdlib/2 and stdlib/3 must remain consistent!
|
||||
# Stubs for os.path
|
||||
# Ron Murawski <ron@horizonchess.com>
|
||||
|
||||
@@ -123,13 +124,13 @@ if sys.version_info < (3, 0):
|
||||
@overload
|
||||
def join(__p1: bytes, *p: bytes) -> bytes: ...
|
||||
@overload
|
||||
def join(__p1: Text, *p: _PathType) -> Text: ...
|
||||
@overload
|
||||
def join(__p1: bytes, __p2: Text, *p: _PathType) -> Text: ...
|
||||
def join(__p1: bytes, __p2: bytes, __p3: bytes, __p4: Text, *p: _PathType) -> Text: ...
|
||||
@overload
|
||||
def join(__p1: bytes, __p2: bytes, __p3: Text, *p: _PathType) -> Text: ...
|
||||
@overload
|
||||
def join(__p1: bytes, __p2: bytes, __p3: bytes, __p4: Text, *p: _PathType) -> Text: ...
|
||||
def join(__p1: bytes, __p2: Text, *p: _PathType) -> Text: ...
|
||||
@overload
|
||||
def join(__p1: Text, *p: _PathType) -> Text: ...
|
||||
elif sys.version_info >= (3, 6):
|
||||
# Mypy complains that the signatures overlap (same for relpath below), but things seem to behave correctly anyway.
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user