Skip to content

Commit 1ef6a70

Browse files
authored
[stdlib][sys] Change return types to use Literal/LiteralString (#15032)
1 parent b4b6330 commit 1ef6a70

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stdlib/sys/__init__.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,13 +378,13 @@ if sys.platform == "android": # noqa: Y008
378378
def getandroidapilevel() -> int: ...
379379

380380
def getallocatedblocks() -> int: ...
381-
def getdefaultencoding() -> str: ...
381+
def getdefaultencoding() -> Literal["utf-8"]: ...
382382

383383
if sys.platform != "win32":
384384
def getdlopenflags() -> int: ...
385385

386-
def getfilesystemencoding() -> str: ...
387-
def getfilesystemencodeerrors() -> str: ...
386+
def getfilesystemencoding() -> LiteralString: ...
387+
def getfilesystemencodeerrors() -> LiteralString: ...
388388
def getrefcount(object: Any, /) -> int: ...
389389
def getrecursionlimit() -> int: ...
390390
def getsizeof(obj: object, default: int = ...) -> int: ...

0 commit comments

Comments
 (0)