generated from jCloud/repository-template
Bug fix: core.python.arguments.PythonASTArgumentsListParser.to_argument_list failed if a type annotation is not a single name
This commit is contained in:
@@ -32,6 +32,7 @@ def argument_list(argument_list: str) -> ast.arguments:
|
||||
@pytest.mark.parametrize('ast_arguments_list,expected', [
|
||||
(argument_list('a'), [PythonFunctionArgument('a', PythonArgumentKind.NORMAL, None, None)]),
|
||||
(argument_list('a: str'), [PythonFunctionArgument('a', PythonArgumentKind.NORMAL, None, 'str')]),
|
||||
(argument_list('a: str | int'), [PythonFunctionArgument('a', PythonArgumentKind.NORMAL, None, 'str | int')]),
|
||||
(argument_list('a: str, b'), [
|
||||
PythonFunctionArgument('a', PythonArgumentKind.NORMAL, None, 'str'),
|
||||
PythonFunctionArgument('b', PythonArgumentKind.NORMAL, None, None)
|
||||
|
||||
Reference in New Issue
Block a user