diff --git a/src/griffe/agents/nodes.py b/src/griffe/agents/nodes.py index 60e2c5ab..2a1fe3f6 100644 --- a/src/griffe/agents/nodes.py +++ b/src/griffe/agents/nodes.py @@ -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: