Skip to content

Commit

Permalink
add a comment about default not being a official keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
keewis committed Jul 25, 2020
1 parent 6ae1c60 commit 864dd0b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sphinx/ext/napoleon/docstring.py
Expand Up @@ -899,6 +899,8 @@ def _token_type(token: str, location: str = None) -> str:
)
type_ = "literal"
elif token in ("optional", "default"):
# default is not a official keyword (yet) but supported by the
# reference implementation (numpydoc) and widely used
type_ = "control"
elif _xref_regex.match(token):
type_ = "reference"
Expand Down

0 comments on commit 864dd0b

Please sign in to comment.