Skip to content

Commit

Permalink
fix some typings
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfeuffer committed Nov 21, 2023
1 parent 3bd3c79 commit 8eb1396
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions autowrap/ConversionProvider.py
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ def type_check_expression(self, cpp_type, arg_var):

def input_conversion(
self, cpp_type: CppType, argument_var: str, arg_num: int
) -> Tuple[Code, str, Code | str, Tuple[str, str]]:
) -> Tuple[Code, str, Union[Code, str], Tuple[str, str]]:
tt_key, tt_value = cpp_type.template_args
temp_var = "v%d" % arg_num

Expand Down Expand Up @@ -1341,7 +1341,7 @@ def type_check_expression(self, cpp_type, arg_var):

def input_conversion(
self, cpp_type: CppType, argument_var: str, arg_num: int
) -> Tuple[Code, str, Code | str, Tuple[str, str]]:
) -> Tuple[Code, str, Union[Code, str], Tuple[str, str]]:
(tt,) = cpp_type.template_args
temp_var = "v%d" % arg_num
inner = self.converters.cython_type(tt)
Expand Down Expand Up @@ -1781,7 +1781,7 @@ def input_conversion(
topmost_code: Optional[Code] = None,
bottommost_code: Optional[Code] = None,
recursion_cnt: int = 0,
) -> Tuple[Code, str, Code | str, Tuple[str, str]]:
) -> Tuple[Code, str, Union[Code, str], Tuple[str, str]]:
"""Do the input conversion for a std::vector<T>
In this case, the template argument is tt (or "inner").
Expand Down Expand Up @@ -2250,7 +2250,7 @@ def matching_python_type_full(self, cpp_type: CppType) -> str:

def input_conversion(
self, cpp_type: CppType, argument_var: str, arg_num: int
) -> Tuple[Code, str, Union[Code, str]]:
) -> Tuple[Code, str, Union[Code, str], Tuple[str, str]]:
(tt,) = cpp_type.template_args
inner = self.converters.cython_type(tt)
# Cython expects us to get a C++ type (we cannot just stick var.inst into the function)
Expand Down

0 comments on commit 8eb1396

Please sign in to comment.