diff --git a/stdlib/_codecs.pyi b/stdlib/_codecs.pyi index 44cc0f78028c..51f17f01ca71 100644 --- a/stdlib/_codecs.pyi +++ b/stdlib/_codecs.pyi @@ -104,35 +104,35 @@ if sys.version_info < (3, 8): def unicode_internal_decode(__obj: str | ReadableBuffer, __errors: str | None = None) -> tuple[str, int]: ... def unicode_internal_encode(__obj: str | ReadableBuffer, __errors: str | None = None) -> tuple[bytes, int]: ... -def utf_16_be_decode(__data: ReadableBuffer, __errors: str | None = None, __final: int = False) -> tuple[str, int]: ... +def utf_16_be_decode(__data: ReadableBuffer, __errors: str | None = None, __final: bool = False) -> tuple[str, int]: ... def utf_16_be_encode(__str: str, __errors: str | None = None) -> tuple[bytes, int]: ... -def utf_16_decode(__data: ReadableBuffer, __errors: str | None = None, __final: int = False) -> tuple[str, int]: ... +def utf_16_decode(__data: ReadableBuffer, __errors: str | None = None, __final: bool = False) -> tuple[str, int]: ... def utf_16_encode(__str: str, __errors: str | None = None, __byteorder: int = 0) -> tuple[bytes, int]: ... def utf_16_ex_decode( - __data: ReadableBuffer, __errors: str | None = None, __byteorder: int = 0, __final: int = False + __data: ReadableBuffer, __errors: str | None = None, __byteorder: int = 0, __final: bool = False ) -> tuple[str, int, int]: ... -def utf_16_le_decode(__data: ReadableBuffer, __errors: str | None = None, __final: int = False) -> tuple[str, int]: ... +def utf_16_le_decode(__data: ReadableBuffer, __errors: str | None = None, __final: bool = False) -> tuple[str, int]: ... def utf_16_le_encode(__str: str, __errors: str | None = None) -> tuple[bytes, int]: ... -def utf_32_be_decode(__data: ReadableBuffer, __errors: str | None = None, __final: int = False) -> tuple[str, int]: ... +def utf_32_be_decode(__data: ReadableBuffer, __errors: str | None = None, __final: bool = False) -> tuple[str, int]: ... def utf_32_be_encode(__str: str, __errors: str | None = None) -> tuple[bytes, int]: ... -def utf_32_decode(__data: ReadableBuffer, __errors: str | None = None, __final: int = False) -> tuple[str, int]: ... +def utf_32_decode(__data: ReadableBuffer, __errors: str | None = None, __final: bool = False) -> tuple[str, int]: ... def utf_32_encode(__str: str, __errors: str | None = None, __byteorder: int = 0) -> tuple[bytes, int]: ... def utf_32_ex_decode( - __data: ReadableBuffer, __errors: str | None = None, __byteorder: int = 0, __final: int = False + __data: ReadableBuffer, __errors: str | None = None, __byteorder: int = 0, __final: bool = False ) -> tuple[str, int, int]: ... -def utf_32_le_decode(__data: ReadableBuffer, __errors: str | None = None, __final: int = False) -> tuple[str, int]: ... +def utf_32_le_decode(__data: ReadableBuffer, __errors: str | None = None, __final: bool = False) -> tuple[str, int]: ... def utf_32_le_encode(__str: str, __errors: str | None = None) -> tuple[bytes, int]: ... -def utf_7_decode(__data: ReadableBuffer, __errors: str | None = None, __final: int = False) -> tuple[str, int]: ... +def utf_7_decode(__data: ReadableBuffer, __errors: str | None = None, __final: bool = False) -> tuple[str, int]: ... def utf_7_encode(__str: str, __errors: str | None = None) -> tuple[bytes, int]: ... -def utf_8_decode(__data: ReadableBuffer, __errors: str | None = None, __final: int = False) -> tuple[str, int]: ... +def utf_8_decode(__data: ReadableBuffer, __errors: str | None = None, __final: bool = False) -> tuple[str, int]: ... def utf_8_encode(__str: str, __errors: str | None = None) -> tuple[bytes, int]: ... if sys.platform == "win32": - def mbcs_decode(__data: ReadableBuffer, __errors: str | None = None, __final: int = False) -> tuple[str, int]: ... + def mbcs_decode(__data: ReadableBuffer, __errors: str | None = None, __final: bool = False) -> tuple[str, int]: ... def mbcs_encode(__str: str, __errors: str | None = None) -> tuple[bytes, int]: ... def code_page_decode( - __codepage: int, __data: ReadableBuffer, __errors: str | None = None, __final: int = False + __codepage: int, __data: ReadableBuffer, __errors: str | None = None, __final: bool = False ) -> tuple[str, int]: ... def code_page_encode(__code_page: int, __str: str, __errors: str | None = None) -> tuple[bytes, int]: ... - def oem_decode(__data: ReadableBuffer, __errors: str | None = None, __final: int = False) -> tuple[str, int]: ... + def oem_decode(__data: ReadableBuffer, __errors: str | None = None, __final: bool = False) -> tuple[str, int]: ... def oem_encode(__str: str, __errors: str | None = None) -> tuple[bytes, int]: ... diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index 022b540d1e48..70c4dff622da 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -1235,7 +1235,7 @@ if sys.version_info >= (3, 8): filename: str | ReadableBuffer | _PathLike[Any], mode: str, flags: Literal[0], - dont_inherit: int = False, + dont_inherit: bool = False, optimize: int = -1, *, _feature_version: int = -1, @@ -1246,7 +1246,7 @@ if sys.version_info >= (3, 8): filename: str | ReadableBuffer | _PathLike[Any], mode: str, *, - dont_inherit: int = False, + dont_inherit: bool = False, optimize: int = -1, _feature_version: int = -1, ) -> CodeType: ... @@ -1256,7 +1256,7 @@ if sys.version_info >= (3, 8): filename: str | ReadableBuffer | _PathLike[Any], mode: str, flags: Literal[1024], - dont_inherit: int = False, + dont_inherit: bool = False, optimize: int = -1, *, _feature_version: int = -1, @@ -1267,7 +1267,7 @@ if sys.version_info >= (3, 8): filename: str | ReadableBuffer | _PathLike[Any], mode: str, flags: int, - dont_inherit: int = False, + dont_inherit: bool = False, optimize: int = -1, *, _feature_version: int = -1, @@ -1280,7 +1280,7 @@ else: filename: str | ReadableBuffer | _PathLike[Any], mode: str, flags: Literal[0], - dont_inherit: int = False, + dont_inherit: bool = False, optimize: int = -1, ) -> CodeType: ... @overload @@ -1289,7 +1289,7 @@ else: filename: str | ReadableBuffer | _PathLike[Any], mode: str, *, - dont_inherit: int = False, + dont_inherit: bool = False, optimize: int = -1, ) -> CodeType: ... @overload @@ -1298,7 +1298,7 @@ else: filename: str | ReadableBuffer | _PathLike[Any], mode: str, flags: Literal[1024], - dont_inherit: int = False, + dont_inherit: bool = False, optimize: int = -1, ) -> _ast.AST: ... @overload @@ -1307,7 +1307,7 @@ else: filename: str | ReadableBuffer | _PathLike[Any], mode: str, flags: int, - dont_inherit: int = False, + dont_inherit: bool = False, optimize: int = -1, ) -> Any: ... diff --git a/stdlib/quopri.pyi b/stdlib/quopri.pyi index 336f733f64c0..b652e139bd0e 100644 --- a/stdlib/quopri.pyi +++ b/stdlib/quopri.pyi @@ -5,7 +5,7 @@ __all__ = ["encode", "decode", "encodestring", "decodestring"] class _Input(SupportsRead[bytes], SupportsNoArgReadline[bytes], Protocol): ... -def encode(input: _Input, output: SupportsWrite[bytes], quotetabs: int, header: int = False) -> None: ... -def encodestring(s: ReadableBuffer, quotetabs: int = False, header: int = False) -> bytes: ... -def decode(input: _Input, output: SupportsWrite[bytes], header: int = False) -> None: ... -def decodestring(s: str | ReadableBuffer, header: int = False) -> bytes: ... +def encode(input: _Input, output: SupportsWrite[bytes], quotetabs: int, header: bool = False) -> None: ... +def encodestring(s: ReadableBuffer, quotetabs: bool = False, header: bool = False) -> bytes: ... +def decode(input: _Input, output: SupportsWrite[bytes], header: bool = False) -> None: ... +def decodestring(s: str | ReadableBuffer, header: bool = False) -> bytes: ... diff --git a/stdlib/tkinter/__init__.pyi b/stdlib/tkinter/__init__.pyi index fdacf0097008..4aab7da1a690 100644 --- a/stdlib/tkinter/__init__.pyi +++ b/stdlib/tkinter/__init__.pyi @@ -421,7 +421,7 @@ class Misc: def winfo_viewable(self) -> bool: ... def winfo_visual(self) -> str: ... def winfo_visualid(self) -> str: ... - def winfo_visualsavailable(self, includeids: int = False) -> list[tuple[str, int]]: ... + def winfo_visualsavailable(self, includeids: bool = False) -> list[tuple[str, int]]: ... def winfo_vrootheight(self) -> int: ... def winfo_vrootwidth(self) -> int: ... def winfo_vrootx(self) -> int: ... diff --git a/stdlib/uu.pyi b/stdlib/uu.pyi index 20e79bf3fec9..324053e04337 100644 --- a/stdlib/uu.pyi +++ b/stdlib/uu.pyi @@ -10,4 +10,4 @@ class Error(Exception): ... def encode( in_file: _File, out_file: _File, name: str | None = None, mode: int | None = None, *, backtick: bool = False ) -> None: ... -def decode(in_file: _File, out_file: _File | None = None, mode: int | None = None, quiet: int = False) -> None: ... +def decode(in_file: _File, out_file: _File | None = None, mode: int | None = None, quiet: bool = False) -> None: ...