templates: Remove `base_path` argument from api_return_values_generator.

Removes `base_path` argument when making the markdown extension for
return values in documentation for API endpoints.

This seems to have been a copy and paste error in commit d2ee99a2fd
when `zerver/lib/markdown/api_return_values_generator.py` was created.
This commit is contained in:
Lauryn Menard 2023-01-31 18:45:04 +01:00 committed by Tim Abbott
parent 20fb9af974
commit f38d5a6a26
2 changed files with 2 additions and 7 deletions

View File

@ -16,9 +16,6 @@ REGEXP = re.compile(r"\{generate_return_values_table\|\s*(.+?)\s*\|\s*(.+)\s*\}"
class MarkdownReturnValuesTableGenerator(Extension): class MarkdownReturnValuesTableGenerator(Extension):
def __init__(self, configs: Mapping[str, Any] = {}) -> None:
self.config: Dict[str, Any] = {}
def extendMarkdown(self, md: markdown.Markdown) -> None: def extendMarkdown(self, md: markdown.Markdown) -> None:
md.preprocessors.register( md.preprocessors.register(
APIReturnValuesTablePreprocessor(md, self.getConfigs()), APIReturnValuesTablePreprocessor(md, self.getConfigs()),
@ -225,4 +222,4 @@ class APIReturnValuesTablePreprocessor(Preprocessor):
def makeExtension(*args: Any, **kwargs: str) -> MarkdownReturnValuesTableGenerator: def makeExtension(*args: Any, **kwargs: str) -> MarkdownReturnValuesTableGenerator:
return MarkdownReturnValuesTableGenerator(kwargs) return MarkdownReturnValuesTableGenerator(*args, **kwargs)

View File

@ -122,9 +122,7 @@ def render_markdown_path(
zerver.lib.markdown.api_arguments_table_generator.makeExtension( zerver.lib.markdown.api_arguments_table_generator.makeExtension(
base_path="templates/zerver/api/" base_path="templates/zerver/api/"
), ),
zerver.lib.markdown.api_return_values_table_generator.makeExtension( zerver.lib.markdown.api_return_values_table_generator.makeExtension(),
base_path="templates/zerver/api/"
),
zerver.lib.markdown.nested_code_blocks.makeExtension(), zerver.lib.markdown.nested_code_blocks.makeExtension(),
zerver.lib.markdown.tabbed_sections.makeExtension(), zerver.lib.markdown.tabbed_sections.makeExtension(),
zerver.lib.markdown.help_settings_links.makeExtension(), zerver.lib.markdown.help_settings_links.makeExtension(),