Skip to content

Commit 49cd9ac

Browse files
committed
Made extract_types return a more useful output
1 parent 9613cdd commit 49cd9ac

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/extract_types.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,17 @@
6060
if isinstance(j, astroid.scoped_nodes.FunctionDef):
6161
if None in j.args.__dict__['annotations']:
6262
missing_parameter_type += 1
63+
print(f"Parameter: {j.__dict__['name']} on line {j.__dict__['lineno']}")
6364
total_1 += 1
6465
if j.returns:
6566
if 'Any' in j.returns.__dict__.values():
66-
missing_return_type += 1
67+
print(f"Return: {j.__dict__['name']} on line {j.__dict__['lineno']}")
68+
missing_return_type += 1
6769
total_2 += 1
6870
elif isinstance(j, astroid.node_classes.AnnAssign):
6971
if 'Any' == j.__dict__['annotation'].__dict__['name']:
7072
missing_attribute_type += 1
73+
print(f"attribute on line {j.__dict__['lineno']}")
7174
total_3 += 1
7275

7376

0 commit comments

Comments
 (0)