mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
make invalid value sets a literal to avoid further warnings
This commit is contained in:
parent
b0da0e5aef
commit
37e02512fc
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user