Skip to content

Commit f8a842a

Browse files
committed
Fix various small mistakes
1 parent 00bdf01 commit f8a842a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

library/info.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,9 @@ def fake_attribute_from_tokens(root,tokens,**kwargs):
129129

130130
def is_store(root):
131131
return match_node(root,ast.Store) or (match_node(root,ast.Name) and match_node(root.ctx,ast.Store))
132+
132133
def single(root):
133-
return match_parent(node,(),ast.Attribute)
134+
return match_parent(root,(),ast.Attribute)
134135

135136
def name(root):
136137
return match_node(root,ast.Name)
@@ -207,8 +208,6 @@ def get_weak_header(root,atok):
207208
root.items if match_node(root,(ast.With)) else
208209
root.type if match_node(root,(ast.ExceptHandler)) else None
209210
)
210-
def get_body(root):
211-
return root.body if match_node(root,(ast.IfExp, ast.If ,ast.For,ast.While, ast.Try)) else None
212211

213212

214213

@@ -255,12 +254,12 @@ def get_return_value(root):
255254
# need to revisit
256255
def get_elements(root):
257256
return (
258-
root.elts if hasattr(root,elts) else None
257+
root.elts if hasattr(root,"elts") else None
259258
)
260259

261260
def get_context(root):
262261
return (
263-
root.ctx if hasattr(root,ctx) else None
262+
root.ctx if hasattr(root,"ctx") else None
264263
)
265264

266265
def get_key_value(root):

0 commit comments

Comments
 (0)