From 8b89ae4970c2a83d2fef9dc9a1ab440c16b899b2 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Thu, 6 Jan 2022 19:42:08 +0300 Subject: [PATCH 1/2] Use `Literal` and `__all__` in `binhex` --- stdlib/binhex.pyi | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/stdlib/binhex.pyi b/stdlib/binhex.pyi index 4e295b8ed903..a7f7e6cc9927 100644 --- a/stdlib/binhex.pyi +++ b/stdlib/binhex.pyi @@ -1,10 +1,13 @@ from typing import IO, Any, Union +from typing_extensions import Literal + +__all__ = ['binhex', 'hexbin', 'Error'] class Error(Exception): ... -REASONABLY_LARGE: int -LINELEN: int -RUNCHAR: bytes +REASONABLY_LARGE: Literal[32768] +LINELEN: Literal[64] +RUNCHAR: Literal[b'\x90'] class FInfo: def __init__(self) -> None: ... From 92174060f59827e19ef2f825373812404fe202be Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 6 Jan 2022 16:43:20 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stdlib/binhex.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/binhex.pyi b/stdlib/binhex.pyi index a7f7e6cc9927..e531ccd508bf 100644 --- a/stdlib/binhex.pyi +++ b/stdlib/binhex.pyi @@ -1,13 +1,13 @@ from typing import IO, Any, Union from typing_extensions import Literal -__all__ = ['binhex', 'hexbin', 'Error'] +__all__ = ["binhex", "hexbin", "Error"] class Error(Exception): ... REASONABLY_LARGE: Literal[32768] LINELEN: Literal[64] -RUNCHAR: Literal[b'\x90'] +RUNCHAR: Literal[b"\x90"] class FInfo: def __init__(self) -> None: ...