Skip to content

Commit

Permalink
refactor: Return ... instead of Ellipsis
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Jan 14, 2022
1 parent 8006ae1 commit f9ae31d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/griffe/agents/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ def _get_call_annotation(node: NodeCall, parent: Module | Class) -> Expression:


def _get_constant_annotation(node: NodeConstant, parent: Module | Class) -> str:
return repr(node.value)
return {type(...): lambda _: "..."}.get(type(node.value), repr)(node.value)


def _get_ellipsis_annotation(node: NodeEllipsis, parent: Module | Class) -> str:
Expand Down

0 comments on commit f9ae31d

Please sign in to comment.