Skip to content

Commit faaa858

Browse files
authored
[_typeshed] Add type aliases FloatInt and ComplexInt (#16068)
1 parent 69209fd commit faaa858

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

stdlib/_typeshed/__init__.pyi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ Unused: TypeAlias = object # stable
5858
# for more information.
5959
MaybeNone: TypeAlias = Any # stable
6060

61+
# typeshed-internal type aliases to facilitate transition from
62+
# `float` to either `float | int` or `float` (and similar for `complex`).
63+
# When you encounter one of these type aliases, you are encouraged to
64+
# replace them with the correct type. Please don't use them outside typeshed.
65+
# See https://github.com/python/typeshed/issues/16059 for details.
66+
FloatInt: TypeAlias = float | int
67+
ComplexInt: TypeAlias = complex | float | int
68+
6169
# Used to mark arguments that default to a sentinel value. This prevents
6270
# stubtest from complaining about the default value not matching.
6371
#

0 commit comments

Comments
 (0)