diff options
Diffstat (limited to 'sphinx/util/docfields.py')
-rw-r--r-- | sphinx/util/docfields.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/util/docfields.py b/sphinx/util/docfields.py index f74f03265..6d48e910c 100644 --- a/sphinx/util/docfields.py +++ b/sphinx/util/docfields.py @@ -209,7 +209,7 @@ class DocFieldTransformer: Transforms field lists in "doc field" syntax into better-looking equivalents, using the field type definitions given on a domain. """ - typemap: Dict[str, Tuple[Field, bool]] = None + typemap: Dict[str, Tuple[Field, bool]] def __init__(self, directive: "ObjectDescription") -> None: self.directive = directive @@ -298,7 +298,7 @@ class DocFieldTransformer: # also support syntax like ``:param type name:`` if typedesc.is_typed: try: - argtype, argname = fieldarg.split(None, 1) + argtype, argname = fieldarg.rsplit(None, 1) except ValueError: pass else: |