mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-15 16:27:08 +08:00
Update input parameter type for os.fsencode (+bytes) and os.fsdecode (+str).
This commit is contained in:
@@ -183,14 +183,14 @@ class statvfs_result: # Unix only
|
||||
|
||||
# ----- os function stubs -----
|
||||
if sys.version_info >= (3, 6):
|
||||
def fsencode(filename: Union[str, PathLike]) -> bytes: ...
|
||||
def fsencode(filename: Union[str, bytes, PathLike]) -> bytes: ...
|
||||
else:
|
||||
def fsencode(filename: str) -> bytes: ...
|
||||
def fsencode(filename: Union[str, bytes]) -> bytes: ...
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
def fsdecode(filename: Union[bytes, PathLike]) -> str: ...
|
||||
def fsdecode(filename: Union[str, bytes, PathLike]) -> str: ...
|
||||
else:
|
||||
def fsdecode(filename: bytes) -> str: ...
|
||||
def fsdecode(filename: Union[str, bytes]) -> str: ...
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user