Skip to content

Commit

Permalink
fix: Don't crash while trying to get the representation of an attribu…
Browse files Browse the repository at this point in the history
…te value
  • Loading branch information
pawamoy committed Jan 2, 2022
1 parent 7ba1589 commit 77ac55d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/griffe/agents/inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,10 @@ def handle_attribute(self, node: ObjectNode, annotation: str | Name | Expression
parent = parent.parent
labels.add("instance")

value = repr(node.obj)
try:
value = repr(node.obj)
except Exception: # could trigger anything
value = None
docstring = self._get_docstring(node)

attribute = Attribute(
Expand Down

0 comments on commit 77ac55d

Please sign in to comment.