Skip to content

Commit

Permalink
Fix crash in logging code analyzing an AnnAssign node (typoed nonexis…
Browse files Browse the repository at this point in the history
…tent attribute).

Fixes #8.

Suggested-by: matt-kempster <>
  • Loading branch information
Technologicat committed Jun 25, 2019
1 parent a1b6dd7 commit beab756
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyan/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ def visit_AnnAssign(self, node): # PEP 526, Python 3.6+
value = sanitize_exprs(node.value)
self.logger.debug("AnnAssign %s %s, %s:%s" % (get_ast_node_name(target[0]),
get_ast_node_name(value[0]),
self.filenaame, node.lineno))
self.filename, node.lineno))
self.analyze_binding(target, value)
else: # just a type declaration
self.logger.debug("AnnAssign %s <no value>, %s:%s" % (get_ast_node_name(target[0]),
Expand Down

0 comments on commit beab756

Please sign in to comment.