File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -273,11 +273,11 @@ struct array_caster {
273273 }
274274
275275 PYBIND11_TYPE_CASTER (ArrayType,
276- const_name (" List[" ) + value_conv::name
276+ const_name<Resizable>(const_name(" " ), const_name(" Annotated[" ))
277+ + const_name(" List[" ) + value_conv::name + const_name(" ]" )
277278 + const_name<Resizable>(const_name(" " ),
278- const_name(" [" ) + const_name<Size>()
279- + const_name(" ]" ))
280- + const_name(" ]" ));
279+ const_name (" , FixedSize(" )
280+ + const_name<Size>() + const_name(" )]" )));
281281};
282282
283283template <typename Type, size_t Size>
Original file line number Diff line number Diff line change @@ -39,8 +39,11 @@ def test_array(doc):
3939 assert m .load_array (lst )
4040 assert m .load_array (tuple (lst ))
4141
42- assert doc (m .cast_array ) == "cast_array() -> List[int[2]]"
43- assert doc (m .load_array ) == "load_array(arg0: List[int[2]]) -> bool"
42+ assert doc (m .cast_array ) == "cast_array() -> Annotated[List[int], FixedSize(2)]"
43+ assert (
44+ doc (m .load_array )
45+ == "load_array(arg0: Annotated[List[int], FixedSize(2)]) -> bool"
46+ )
4447
4548
4649def test_valarray (doc ):
You can’t perform that action at this time.
0 commit comments