diff --git a/sphinx/ext/napoleon/docstring.py b/sphinx/ext/napoleon/docstring.py index 7437f5f39..6ce3798f9 100644 --- a/sphinx/ext/napoleon/docstring.py +++ b/sphinx/ext/napoleon/docstring.py @@ -852,6 +852,9 @@ def _convert_numpy_type_spec(_type, translations={}): or (token.startswith("'") and token.endswith("'")) ): type_ = "literal" + elif token.startswith("{"): + # invalid value set, make it a literal to avoid further warnings + type_ = "literal" elif token in ("optional", "default"): type_ = "control" elif _xref_regex.match(token):