ruff: Fix N803 argument name should be lowercase.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2022-11-15 21:15:41 -08:00 committed by Tim Abbott
parent cc01c68aa9
commit 2876ae8e48
2 changed files with 5 additions and 5 deletions

View File

@ -2282,15 +2282,15 @@ class ZulipMarkdown(markdown.Markdown):
reg.register(UnicodeEmoji(UNICODE_EMOJI_RE), "unicodeemoji", 0)
return reg
def register_linkifiers(self, inlinePatterns: markdown.util.Registry) -> markdown.util.Registry:
def register_linkifiers(self, registry: markdown.util.Registry) -> markdown.util.Registry:
for linkifier in self.linkifiers:
pattern = linkifier["pattern"]
inlinePatterns.register(
registry.register(
LinkifierPattern(pattern, linkifier["url_format"], self),
f"linkifiers/{pattern}",
45,
)
return inlinePatterns
return registry
def build_treeprocessors(self) -> markdown.util.Registry:
# Here we build all the processors from upstream, plus a few of our own.

View File

@ -437,11 +437,11 @@ class APIMarkdownExtension(Extension):
class BasePreprocessor(Preprocessor):
def __init__(
self, REGEXP: Pattern[str], md: markdown.Markdown, config: Mapping[str, Any]
self, regexp: Pattern[str], md: markdown.Markdown, config: Mapping[str, Any]
) -> None:
super().__init__(md)
self.api_url = config["api_url"]
self.REGEXP = REGEXP
self.REGEXP = regexp
def run(self, lines: List[str]) -> List[str]:
done = False