From 99a1afd72b241c46ddfdb6c655b8697996d4fe24 Mon Sep 17 00:00:00 2001 From: Semyon Proshev Date: Sat, 18 Mar 2017 18:12:27 +0300 Subject: [PATCH] Update input parameter type for `os.fsencode` (+bytes) and `os.fsdecode` (+str). --- stdlib/3/os/__init__.pyi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stdlib/3/os/__init__.pyi b/stdlib/3/os/__init__.pyi index b19359561..34f697d08 100644 --- a/stdlib/3/os/__init__.pyi +++ b/stdlib/3/os/__init__.pyi @@ -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