From 864dd0b610ff245352e3a1b51d716264cd255fc9 Mon Sep 17 00:00:00 2001 From: Keewis Date: Sat, 25 Jul 2020 11:54:02 +0200 Subject: [PATCH] add a comment about default not being a official keyword --- sphinx/ext/napoleon/docstring.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sphinx/ext/napoleon/docstring.py b/sphinx/ext/napoleon/docstring.py index e610f0427c0..95fb1e538a0 100644 --- a/sphinx/ext/napoleon/docstring.py +++ b/sphinx/ext/napoleon/docstring.py @@ -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"