Skip to content

Commit cb53174

Browse files
committed
update int type hint
1 parent 18fd77f commit cb53174

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

tests/test_pytypes.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,27 +1101,27 @@ def test_generic(doc):
11011101
assert doc(m.generic_T) == "generic_T[T]() -> None"
11021102

11031103
assert (
1104-
doc(m.generic_bound_int) == "generic_bound_int[T: typing.SupportsInt]() -> None"
1104+
doc(m.generic_bound_int) == "generic_bound_int[T: typing.SupportsInt | typing.SupportsIndex]() -> None"
11051105
)
11061106

11071107
assert (
11081108
doc(m.generic_constraints_int_str)
1109-
== "generic_constraints_int_str[T: (typing.SupportsInt, str)]() -> None"
1109+
== "generic_constraints_int_str[T: (typing.SupportsInt | typing.SupportsIndex, str)]() -> None"
11101110
)
11111111

11121112
assert (
11131113
doc(m.generic_default_int)
1114-
== "generic_default_int[T = typing.SupportsInt]() -> None"
1114+
== "generic_default_int[T = typing.SupportsInt | typing.SupportsIndex]() -> None"
11151115
)
11161116

11171117
assert (
11181118
doc(m.generic_bound_and_default_int)
1119-
== "generic_bound_and_default_int[T: typing.SupportsInt = typing.SupportsInt]() -> None"
1119+
== "generic_bound_and_default_int[T: typing.SupportsInt | typing.SupportsIndex = typing.SupportsInt | typing.SupportsIndex]() -> None"
11201120
)
11211121

11221122
assert (
11231123
doc(m.generic_constraints_and_default)
1124-
== "generic_constraints_and_default[T: (list[typing.SupportsInt], str) = str]() -> None"
1124+
== "generic_constraints_and_default[T: (list[typing.SupportsInt | typing.SupportsIndex], str) = str]() -> None"
11251125
)
11261126

11271127

@@ -1141,27 +1141,27 @@ def test_typevar(doc):
11411141

11421142
assert (
11431143
doc(m.typevar_bound_int)
1144-
== "typevar_bound_int[T: typing.SupportsInt](arg0: T) -> None"
1144+
== "typevar_bound_int[T: typing.SupportsInt | typing.SupportsIndex](arg0: T) -> None"
11451145
)
11461146

11471147
assert (
11481148
doc(m.typevar_constraints_int_str)
1149-
== "typevar_constraints_int_str[T: (typing.SupportsInt, str)](arg0: T) -> None"
1149+
== "typevar_constraints_int_str[T: (typing.SupportsInt | typing.SupportsIndex, str)](arg0: T) -> None"
11501150
)
11511151

11521152
assert (
11531153
doc(m.typevar_default_int)
1154-
== "typevar_default_int[T = typing.SupportsInt](arg0: T) -> None"
1154+
== "typevar_default_int[T = typing.SupportsInt | typing.SupportsIndex](arg0: T) -> None"
11551155
)
11561156

11571157
assert (
11581158
doc(m.typevar_bound_and_default_int)
1159-
== "typevar_bound_and_default_int[T: typing.SupportsInt = typing.SupportsInt](arg0: T) -> None"
1159+
== "typevar_bound_and_default_int[T: typing.SupportsInt | typing.SupportsIndex = typing.SupportsInt | typing.SupportsIndex](arg0: T) -> None"
11601160
)
11611161

11621162
assert (
11631163
doc(m.typevar_constraints_and_default)
1164-
== "typevar_constraints_and_default[T: (list[typing.SupportsInt], str) = str](arg0: T) -> None"
1164+
== "typevar_constraints_and_default[T: (list[typing.SupportsInt | typing.SupportsIndex], str) = str](arg0: T) -> None"
11651165
)
11661166

11671167

0 commit comments

Comments
 (0)