From bba1c67610ce03107011beb91d7bf320e97695b7 Mon Sep 17 00:00:00 2001 From: Jukka Lehtosalo Date: Sat, 4 Feb 2023 12:54:39 +0000 Subject: [PATCH] Update `mypy_extensions` stubs to 1.0.x (#9675) --- stubs/mypy-extensions/@tests/stubtest_allowlist.txt | 4 ++++ stubs/mypy-extensions/METADATA.toml | 2 +- stubs/mypy-extensions/mypy_extensions.pyi | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/stubs/mypy-extensions/@tests/stubtest_allowlist.txt b/stubs/mypy-extensions/@tests/stubtest_allowlist.txt index bffaebc69..4f48c1c4b 100644 --- a/stubs/mypy-extensions/@tests/stubtest_allowlist.txt +++ b/stubs/mypy-extensions/@tests/stubtest_allowlist.txt @@ -1,2 +1,6 @@ mypy_extensions.FlexibleAlias mypy_extensions.TypedDict +mypy_extensions.i64.* +mypy_extensions.i32.* +mypy_extensions.i16.* +mypy_extensions.u8.* diff --git a/stubs/mypy-extensions/METADATA.toml b/stubs/mypy-extensions/METADATA.toml index de6579f75..516f11f6b 100644 --- a/stubs/mypy-extensions/METADATA.toml +++ b/stubs/mypy-extensions/METADATA.toml @@ -1,4 +1,4 @@ -version = "0.4.*" +version = "1.0.*" [tool.stubtest] ignore_missing_stub = false diff --git a/stubs/mypy-extensions/mypy_extensions.pyi b/stubs/mypy-extensions/mypy_extensions.pyi index 47547942b..195d1cbca 100644 --- a/stubs/mypy-extensions/mypy_extensions.pyi +++ b/stubs/mypy-extensions/mypy_extensions.pyi @@ -68,3 +68,11 @@ def trait(cls: _T) -> _T: ... def mypyc_attr(*attrs: str, **kwattrs: object) -> IdentityFunction: ... class FlexibleAlias(Generic[_T, _U]): ... + +# Mypy and mypyc treat these native int types as different from 'int', but this is +# a non-standard extension. For other tools, aliasing these to 'int' allows them +# to mostly do the right thing with these types. +i64 = int +i32 = int +i16 = int +u8 = int