File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,10 +62,14 @@ def convert_folder(top_level, stub_directory):
6262 print (i .__dict__ ['name' ])
6363 for j in i .body :
6464 if isinstance (j , astroid .scoped_nodes .FunctionDef ):
65- for i in j .args .__dict__ ['annotations' ]:
66- if type (i ) == astroid .node_classes .Name :
67- if i .name == 'Any' :
65+ for k , l in zip (j .args .__dict__ ['annotations' ], j .args .__dict__ ['args' ]):
66+ # K is type, l is name
67+ if l .name != 'self' :
68+ if not k :
6869 print (f"Missing parameter type: { j .__dict__ ['name' ]} on line { j .__dict__ ['lineno' ]} \n " )
70+ elif str (type (k )) == "<class 'astroid.node_classes.Name'>" :
71+ if k .name == 'Any' :
72+ print (f"'Any' parameter type: { j .__dict__ ['name' ]} on line { j .__dict__ ['lineno' ]} \n " )
6973 if j .returns :
7074 if 'Any' in j .returns .__dict__ .values ():
7175 print (f"Missing return type: { j .__dict__ ['name' ]} on line { j .__dict__ ['lineno' ]} " )
You can’t perform that action at this time.
0 commit comments