Skip to content

Commit

Permalink
minimal patch to fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Mar 5, 2021
1 parent 7aacf43 commit 6503ba7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bugbear.py
Expand Up @@ -124,8 +124,10 @@ def _to_name_str(node):
# "pkg.mod.error", handling any depth of attribute accesses.
if isinstance(node, ast.Name):
return node.id
assert isinstance(node, ast.Attribute)
return _to_name_str(node.value) + "." + node.attr
try:
return _to_name_str(node.value) + "." + node.attr
except AttributeError:
return _to_name_str(node.value)


def _typesafe_issubclass(cls, class_or_tuple):
Expand Down

0 comments on commit 6503ba7

Please sign in to comment.