From 49cd9ac36e605d85ef393c8c009b90c418305ebe Mon Sep 17 00:00:00 2001 From: dherrada Date: Fri, 15 May 2020 13:29:41 -0400 Subject: [PATCH] Made extract_types return a more useful output --- tools/extract_types.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/extract_types.py b/tools/extract_types.py index 502c69455d..f5b9e8613e 100644 --- a/tools/extract_types.py +++ b/tools/extract_types.py @@ -60,14 +60,17 @@ for module in modules: if isinstance(j, astroid.scoped_nodes.FunctionDef): if None in j.args.__dict__['annotations']: missing_parameter_type += 1 + print(f"Parameter: {j.__dict__['name']} on line {j.__dict__['lineno']}") total_1 += 1 if j.returns: if 'Any' in j.returns.__dict__.values(): - missing_return_type += 1 + print(f"Return: {j.__dict__['name']} on line {j.__dict__['lineno']}") + missing_return_type += 1 total_2 += 1 elif isinstance(j, astroid.node_classes.AnnAssign): if 'Any' == j.__dict__['annotation'].__dict__['name']: missing_attribute_type += 1 + print(f"attribute on line {j.__dict__['lineno']}") total_3 += 1