add a comment about default not being a official keyword

This commit is contained in:
Keewis 2020-07-25 11:54:02 +02:00
parent 6ae1c601b9
commit 864dd0b610

View File

@ -899,6 +899,8 @@ def _token_type(token: str, location: str = None) -> str:
) )
type_ = "literal" type_ = "literal"
elif token in ("optional", "default"): elif token in ("optional", "default"):
# default is not a official keyword (yet) but supported by the
# reference implementation (numpydoc) and widely used
type_ = "control" type_ = "control"
elif _xref_regex.match(token): elif _xref_regex.match(token):
type_ = "reference" type_ = "reference"