diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-01-03 16:48:51 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-01-03 16:50:38 +0300 |
commit | bad2444ed516f1a4454b6b735905cfc5f04abae9 (patch) | |
tree | c97d245bb7489da3a804a4c4fc52fe15bec07a38 /sphinx/domains/std.py | |
parent | 1b7d16505ea6e77586c6c4f4afc15a3e73116d80 (diff) |
refactor: Update typehints for ObjectDescription using Generic
Diffstat (limited to 'sphinx/domains/std.py')
-rw-r--r-- | sphinx/domains/std.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/domains/std.py b/sphinx/domains/std.py index bdce2406e..33acdb3f5 100644 --- a/sphinx/domains/std.py +++ b/sphinx/domains/std.py @@ -48,7 +48,7 @@ option_desc_re = re.compile(r'((?:/|--|-|\+)?[^\s=]+)(=?\s*.*)') token_re = re.compile(r'`(\w+)`', re.U) -class GenericObject(ObjectDescription): +class GenericObject(ObjectDescription[str]): """ A generic x-ref directive registered with Sphinx.add_object_type(). """ @@ -178,7 +178,7 @@ class Target(SphinxDirective): return self.name + '-' + name -class Cmdoption(ObjectDescription): +class Cmdoption(ObjectDescription[str]): """ Description of a command-line option (.. option). """ |