File "waterloo/refactor/annotations.py", line 144, in m_add_type_comment
if not signature.arg_types.is_fully_typed:
AttributeError: 'NoneType' object has no attribute 'is_fully_typed'
If "Args" is not given but ALLOW_UNTYPED_ARGS =True then we should still annotate this as: (...) -> <return type>
Thinking about it more, this case is likely to occur in situation where func takes no args. In which case we should happily annotate it as () -> <return type>, regardless of ALLOW_UNTYPED_ARGS setting.
To do that we need to inspect the function signature, which so far we haven't done.
Actually we should validate the annotation names against the signature in all cases!
If names don't match, or annotations are missing names from the signature then we should treat as is_fully_typed=False
This case currently gives:
If "Args" is not given but
ALLOW_UNTYPED_ARGS =True
then we should still annotate this as:(...) -> <return type>
Thinking about it more, this case is likely to occur in situation where func takes no args. In which case we should happily annotate it as
() -> <return type>
, regardless ofALLOW_UNTYPED_ARGS
setting.To do that we need to inspect the function signature, which so far we haven't done.
Actually we should validate the annotation names against the signature in all cases!
If names don't match, or annotations are missing names from the signature then we should treat as
is_fully_typed=False