@@ -440,7 +440,7 @@ def is_tuple(typename):
440
440
return typename .startswith ("tuple" )
441
441
442
442
443
- def is_collection_type (typename ):
443
+ def is_sequence_type (typename ):
444
444
return typename .startswith ("vector" )
445
445
446
446
@@ -467,17 +467,17 @@ def convert_ctype_name_to_pytype_name(typename):
467
467
pytype = CTYPE_TO_PYTYPE_MAP .get (typename )
468
468
if pytype is not None :
469
469
return pytype
470
- if is_collection_type (typename ):
470
+ if is_sequence_type (typename ):
471
471
if is_template_class_instantiation (typename ):
472
- collection_pytype = convert_ctype_name_to_pytype_name (
472
+ sequence_pytype = convert_ctype_name_to_pytype_name (
473
473
get_template_instantiation_type (typename )
474
474
)
475
475
else :
476
- # maxsplit=1 - recursively find pytype of collection always examinating
476
+ # maxsplit=1 - recursively find pytype of sequence always examinating
477
477
# the outermost of inner type:
478
- # Example: vector_vector_Mat -> Collection[Collection [Mat]]
479
- collection_pytype = convert_ctype_name_to_pytype_name (typename .split ("_" , 1 )[- 1 ])
480
- return "Collection [{}]" .format (collection_pytype )
478
+ # Example: vector_vector_Mat -> Sequence[Sequence [Mat]]
479
+ sequence_pytype = convert_ctype_name_to_pytype_name (typename .split ("_" , 1 )[- 1 ])
480
+ return "Sequence [{}]" .format (sequence_pytype )
481
481
if is_pointer_type (typename ):
482
482
if typename .endswith ("*" ):
483
483
return convert_ctype_name_to_pytype_name (typename [:- 1 ])
0 commit comments