Commit 19f1477f authored by Stefan Behnel's avatar Stefan Behnel

analyse argument annotations as types really only when annotation_typing=True

--HG--
extra : transplant_source : %B2a%A7%A9%A6%2A%2C%21%11%A1%D3%A0%F4%0D%D1%C7K%97%60_
parent 98b0f5db
......@@ -1583,7 +1583,7 @@ class FuncDefNode(StatNode, BlockNode):
if arg.name in directive_locals:
type_node = directive_locals[arg.name]
other_type = type_node.analyse_as_type(env)
elif isinstance(arg, CArgDeclNode) and arg.annotation:
elif isinstance(arg, CArgDeclNode) and arg.annotation and env.directives['annotation_typing']:
type_node = arg.annotation
other_type = arg.inject_type_from_annotations(env)
if other_type is None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment