diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-10-24 12:12:45 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-10-24 12:12:45 +0300 |
commit | 445b9515c126aab84f14251e57e289cb12121754 (patch) | |
tree | 7032b82311cff77d74b66537499075480e7a8f5f /sphinx/registry.py | |
parent | e4e5ee33307abdc65fba6244ae7349987ddae529 (diff) | |
parent | 071b14884c90e807827079ee18b1677ea71833e6 (diff) |
Merge branch '3.x'
Diffstat (limited to 'sphinx/registry.py')
-rw-r--r-- | sphinx/registry.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/registry.py b/sphinx/registry.py index 43cc35e0d..541fef1b3 100644 --- a/sphinx/registry.py +++ b/sphinx/registry.py @@ -258,12 +258,12 @@ class SphinxComponentRegistry: else: self.source_suffix[suffix] = filetype - def add_source_parser(self, parser: "Type[Parser]", **kwargs: Any) -> None: + def add_source_parser(self, parser: "Type[Parser]", override: bool = False) -> None: logger.debug('[app] adding search source_parser: %r', parser) # create a map from filetype to parser for filetype in parser.supported: - if filetype in self.source_parsers and not kwargs.get('override'): + if filetype in self.source_parsers and not override: raise ExtensionError(__('source_parser for %r is already registered') % filetype) else: |