Skip to content

Commit e169da3

Browse files
committed
More extract_pyi tweaks
1 parent e114b31 commit e169da3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tools/extract_pyi.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,18 @@ def convert_folder(top_level, stub_directory):
5959
tree = astroid.parse(stub_contents)
6060
for i in tree.body:
6161
if 'name' in i.__dict__:
62+
print()
6263
print(i.__dict__['name'])
6364
for j in i.body:
6465
if isinstance(j, astroid.scoped_nodes.FunctionDef):
6566
for k, l in zip(j.args.__dict__['annotations'], j.args.__dict__['args']):
6667
# K is type, l is name
6768
if l.name != 'self':
6869
if not k:
69-
print(f"Missing parameter type: {j.__dict__['name']} on line {j.__dict__['lineno']}\n")
70+
print(f"Missing parameter type: {j.__dict__['name']} on line {j.__dict__['lineno']}")
7071
elif str(type(k)) == "<class 'astroid.node_classes.Name'>":
7172
if k.name == 'Any':
72-
print(f"'Any' parameter type: {j.__dict__['name']} on line {j.__dict__['lineno']}\n")
73+
print(f"'Any' parameter type: {j.__dict__['name']} on line {j.__dict__['lineno']}")
7374
if j.returns:
7475
if 'Any' in j.returns.__dict__.values():
7576
print(f"Missing return type: {j.__dict__['name']} on line {j.__dict__['lineno']}")

0 commit comments

Comments
 (0)