From 7f0e11bd062e23afc0a5889cabf462c545fd09b8 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sat, 25 Jun 2022 17:35:20 -0700 Subject: [PATCH] markdown: Rename preprocessor_priorities module to priorities. Signed-off-by: Anders Kaseorg --- zerver/lib/markdown/api_arguments_table_generator.py | 2 +- zerver/lib/markdown/api_return_values_table_generator.py | 2 +- zerver/lib/markdown/fenced_code.py | 2 +- zerver/lib/markdown/help_emoticon_translations_table.py | 2 +- zerver/lib/markdown/help_relative_links.py | 2 +- zerver/lib/markdown/help_settings_links.py | 2 +- zerver/lib/markdown/include.py | 2 +- zerver/lib/markdown/nested_code_blocks.py | 2 +- .../lib/markdown/{preprocessor_priorities.py => priorities.py} | 0 zerver/lib/markdown/tabbed_sections.py | 2 +- zerver/openapi/markdown_extension.py | 2 +- 11 files changed, 10 insertions(+), 10 deletions(-) rename zerver/lib/markdown/{preprocessor_priorities.py => priorities.py} (100%) diff --git a/zerver/lib/markdown/api_arguments_table_generator.py b/zerver/lib/markdown/api_arguments_table_generator.py index 85f7700d54..c5a7e8ed1e 100644 --- a/zerver/lib/markdown/api_arguments_table_generator.py +++ b/zerver/lib/markdown/api_arguments_table_generator.py @@ -8,7 +8,7 @@ from django.utils.html import escape as escape_html from markdown.extensions import Extension from markdown.preprocessors import Preprocessor -from zerver.lib.markdown.preprocessor_priorities import PREPROCESSOR_PRIORITES +from zerver.lib.markdown.priorities import PREPROCESSOR_PRIORITES from zerver.openapi.openapi import ( check_deprecated_consistency, get_openapi_parameters, diff --git a/zerver/lib/markdown/api_return_values_table_generator.py b/zerver/lib/markdown/api_return_values_table_generator.py index 360387f8b2..65637cd08c 100644 --- a/zerver/lib/markdown/api_return_values_table_generator.py +++ b/zerver/lib/markdown/api_return_values_table_generator.py @@ -7,7 +7,7 @@ import markdown from markdown.extensions import Extension from markdown.preprocessors import Preprocessor -from zerver.lib.markdown.preprocessor_priorities import PREPROCESSOR_PRIORITES +from zerver.lib.markdown.priorities import PREPROCESSOR_PRIORITES from zerver.openapi.openapi import check_deprecated_consistency, get_openapi_return_values from .api_arguments_table_generator import generate_data_type diff --git a/zerver/lib/markdown/fenced_code.py b/zerver/lib/markdown/fenced_code.py index 37081a184d..01f7222ddc 100644 --- a/zerver/lib/markdown/fenced_code.py +++ b/zerver/lib/markdown/fenced_code.py @@ -88,7 +88,7 @@ from pygments.lexers import find_lexer_class_by_name from pygments.util import ClassNotFound from zerver.lib.exceptions import MarkdownRenderingException -from zerver.lib.markdown.preprocessor_priorities import PREPROCESSOR_PRIORITES +from zerver.lib.markdown.priorities import PREPROCESSOR_PRIORITES from zerver.lib.tex import render_tex # Global vars diff --git a/zerver/lib/markdown/help_emoticon_translations_table.py b/zerver/lib/markdown/help_emoticon_translations_table.py index de09e9c9e0..a443ad8eac 100644 --- a/zerver/lib/markdown/help_emoticon_translations_table.py +++ b/zerver/lib/markdown/help_emoticon_translations_table.py @@ -6,7 +6,7 @@ from markdown.extensions import Extension from markdown.preprocessors import Preprocessor from zerver.lib.emoji import EMOTICON_CONVERSIONS, name_to_codepoint -from zerver.lib.markdown.preprocessor_priorities import PREPROCESSOR_PRIORITES +from zerver.lib.markdown.priorities import PREPROCESSOR_PRIORITES REGEXP = re.compile(r"\{emoticon_translations\}") diff --git a/zerver/lib/markdown/help_relative_links.py b/zerver/lib/markdown/help_relative_links.py index a4ec8cf6f7..bf43651cd6 100644 --- a/zerver/lib/markdown/help_relative_links.py +++ b/zerver/lib/markdown/help_relative_links.py @@ -5,7 +5,7 @@ from markdown import Markdown from markdown.extensions import Extension from markdown.preprocessors import Preprocessor -from zerver.lib.markdown.preprocessor_priorities import PREPROCESSOR_PRIORITES +from zerver.lib.markdown.priorities import PREPROCESSOR_PRIORITES # There is a lot of duplicated code between this file and # help_settings_links.py. So if you're making a change here consider making diff --git a/zerver/lib/markdown/help_settings_links.py b/zerver/lib/markdown/help_settings_links.py index 10194092cd..9f03c6fe95 100644 --- a/zerver/lib/markdown/help_settings_links.py +++ b/zerver/lib/markdown/help_settings_links.py @@ -5,7 +5,7 @@ from markdown import Markdown from markdown.extensions import Extension from markdown.preprocessors import Preprocessor -from zerver.lib.markdown.preprocessor_priorities import PREPROCESSOR_PRIORITES +from zerver.lib.markdown.priorities import PREPROCESSOR_PRIORITES # There is a lot of duplicated code between this file and # help_relative_links.py. So if you're making a change here consider making diff --git a/zerver/lib/markdown/include.py b/zerver/lib/markdown/include.py index 7fcafdbe06..77bcb058b6 100644 --- a/zerver/lib/markdown/include.py +++ b/zerver/lib/markdown/include.py @@ -6,7 +6,7 @@ import markdown from markdown_include.include import IncludePreprocessor, MarkdownInclude from zerver.lib.exceptions import InvalidMarkdownIncludeStatement -from zerver.lib.markdown.preprocessor_priorities import PREPROCESSOR_PRIORITES +from zerver.lib.markdown.priorities import PREPROCESSOR_PRIORITES INC_SYNTAX = re.compile(r"\{!\s*(.+?)\s*!\}") diff --git a/zerver/lib/markdown/nested_code_blocks.py b/zerver/lib/markdown/nested_code_blocks.py index 766b62a993..73bd6c1bfc 100644 --- a/zerver/lib/markdown/nested_code_blocks.py +++ b/zerver/lib/markdown/nested_code_blocks.py @@ -5,7 +5,7 @@ import markdown from markdown.extensions import Extension from zerver.lib.markdown import ResultWithFamily, walk_tree_with_family -from zerver.lib.markdown.preprocessor_priorities import PREPROCESSOR_PRIORITES +from zerver.lib.markdown.priorities import PREPROCESSOR_PRIORITES class NestedCodeBlocksRenderer(Extension): diff --git a/zerver/lib/markdown/preprocessor_priorities.py b/zerver/lib/markdown/priorities.py similarity index 100% rename from zerver/lib/markdown/preprocessor_priorities.py rename to zerver/lib/markdown/priorities.py diff --git a/zerver/lib/markdown/tabbed_sections.py b/zerver/lib/markdown/tabbed_sections.py index c67118616f..8cb00b8baf 100644 --- a/zerver/lib/markdown/tabbed_sections.py +++ b/zerver/lib/markdown/tabbed_sections.py @@ -5,7 +5,7 @@ import markdown from markdown.extensions import Extension from markdown.preprocessors import Preprocessor -from zerver.lib.markdown.preprocessor_priorities import PREPROCESSOR_PRIORITES +from zerver.lib.markdown.priorities import PREPROCESSOR_PRIORITES START_TABBED_SECTION_REGEX = re.compile(r"^\{start_tabs\}$") END_TABBED_SECTION_REGEX = re.compile(r"^\{end_tabs\}$") diff --git a/zerver/openapi/markdown_extension.py b/zerver/openapi/markdown_extension.py index d120e9f217..b049f9cb0e 100644 --- a/zerver/openapi/markdown_extension.py +++ b/zerver/openapi/markdown_extension.py @@ -18,7 +18,7 @@ from markdown.extensions import Extension from markdown.preprocessors import Preprocessor import zerver.openapi.python_examples -from zerver.lib.markdown.preprocessor_priorities import PREPROCESSOR_PRIORITES +from zerver.lib.markdown.priorities import PREPROCESSOR_PRIORITES from zerver.openapi.openapi import ( check_additional_imports, check_requires_administrator,