Skip to content

Commit f587d73

Browse files
committed
cleanup
1 parent 33421ff commit f587d73

17 files changed

Lines changed: 27 additions & 11 deletions

markdown/extensions/abbr.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,16 @@ def load_glossary(self, dictionary: dict[str, str]):
6969
self.glossary = {**dictionary, **self.glossary}
7070

7171
def extendMarkdown(self, md):
72-
"""
73-
Register the processors.
72+
"""
73+
Register the processors.
7474
7575
| Class Instance | Registry | Name | Priority |
7676
| ------------------------------------------------------------------- | ---------------------------------------------------------------- | ------ | :------: |
7777
| [`AbbrTreeprocessor`][markdown.extensions.abbr.AbbrTreeprocessor] | [`treeprocessors`][markdown.treeprocessors.build_treeprocessors] | `abbr` | `7` |
7878
| [`AbbrBlockprocessor`][markdown.extensions.abbr.AbbrBlockprocessor] | [`blockprocessors`][markdown.blockprocessors.build_block_parser] | `abbr` | `16` |
7979
8080
"""
81+
# flake8: noqa: E501 75-78
8182
if (self.config['glossary'][0]):
8283
self.load_glossary(self.config['glossary'][0])
8384
self.abbrs.update(self.glossary)

markdown/extensions/admonition.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,15 @@ class AdmonitionExtension(Extension):
4141
""" Admonition extension for Python-Markdown. """
4242

4343
def extendMarkdown(self, md):
44-
"""
44+
"""
4545
Register the processor.
4646
4747
| Class Instance | Registry | Name | Priority |
4848
| --------------------------------------------------------------------------- | ---------------------------------------------------------------- | ------ | :------: |
4949
| [`AdmonitionProcessor`][markdown.extensions.admonition.AdmonitionProcessor] | [`blockprocessors`][markdown.blockprocessors.build_block_parser] | `admonition` | `105` |
5050
5151
"""
52+
# flake8: noqa: E501 47-49
5253
md.registerExtension(self)
5354

5455
md.parser.blockprocessors.register(AdmonitionProcessor(md.parser), 'admonition', 105)

markdown/extensions/attr_list.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,15 @@ def sanitize_name(self, name: str) -> str:
196196
class AttrListExtension(Extension):
197197
""" Attribute List extension for Python-Markdown """
198198
def extendMarkdown(self, md):
199-
"""
199+
"""
200200
Register the processor.
201201
202202
| Class Instance | Registry | Name | Priority |
203203
| --------------------------------------------------------------------------- | ---------------------------------------------------------------- | ------ | :------: |
204204
| [`AttrListTreeprocessor`][markdown.extensions.attr_list.AttrListTreeprocessor] | [`treeprocessors`][markdown.treeprocessors.build_treeprocessors] | `attr_list` | `8` |
205205
206206
"""
207+
# flake8: noqa: E501 202-204
207208
md.treeprocessors.register(AttrListTreeprocessor(md), 'attr_list', 8)
208209
md.registerExtension(self)
209210

markdown/extensions/codehilite.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,14 +335,15 @@ def __init__(self, **kwargs):
335335
self.config[key] = [value, '']
336336

337337
def extendMarkdown(self, md):
338-
"""
338+
"""
339339
Register the processor.
340340
341341
| Class Instance | Registry | Name | Priority |
342342
| --------------------------------------------------------------------------- | ---------------------------------------------------------------- | ------ | :------: |
343343
| [`HiliteTreeprocessor`][markdown.extensions.codehilite.HiliteTreeprocessor] | [`treeprocessors`][markdown.treeprocessors.build_treeprocessors] | `hilite` | `30` |
344344
345345
"""
346+
# flake8: noqa: E501 341-343
346347
hiliter = HiliteTreeprocessor(md)
347348
hiliter.config = self.getConfigs()
348349
md.treeprocessors.register(hiliter, 'hilite', 30)

markdown/extensions/def_list.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class DefListExtension(Extension):
110110
""" Add definition lists to Markdown. """
111111

112112
def extendMarkdown(self, md):
113-
"""
113+
"""
114114
Register the processors.
115115
116116
| Class Instance | Registry | Name | Priority |
@@ -119,6 +119,7 @@ def extendMarkdown(self, md):
119119
| [`DefListProcessor`][markdown.extensions.def_list.DefListProcessor] | [`blockprocessors`][markdown.blockprocessors.build_block_parser] | `deflist` | `25` |
120120
121121
"""
122+
# flake8: noqa: E501 116-119
122123
md.parser.blockprocessors.register(DefListIndentProcessor(md.parser), 'defindent', 85)
123124
md.parser.blockprocessors.register(DefListProcessor(md.parser), 'deflist', 25)
124125

markdown/extensions/fenced_code.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,15 @@ def __init__(self, **kwargs):
4444
super().__init__(**kwargs)
4545

4646
def extendMarkdown(self, md):
47-
"""
47+
"""
4848
Register the processor.
4949
5050
| Class Instance | Registry | Name | Priority |
5151
| --------------------------------------------------------------------------- | ---------------------------------------------------------------- | ------ | :------: |
5252
| [`FencedBlockPreprocessor`][markdown.extensions.fenced_code.FencedBlockPreprocessor] | [`blockprocessors`][markdown.blockprocessors.build_block_parser] | `fenced_code_block` | `25` |
5353
54-
"""
54+
"""
55+
# flake8: noqa: E501 50-52
5556
md.registerExtension(self)
5657

5758
md.preprocessors.register(FencedBlockPreprocessor(md, self.getConfigs()), 'fenced_code_block', 25)

markdown/extensions/footnotes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ def extendMarkdown(self, md):
9595
| [`FootnotePostprocessor`][markdown.extensions.footnotes.FootnotePostprocessor] | [`postprocessors`][markdown.postprocessors.build_postprocessors] | `footnote` | `25` |
9696
9797
"""
98+
# flake8: noqa: E501 88-95
9899
md.registerExtension(self)
99100
self.parser = md.parser
100101
self.md = md

markdown/extensions/legacy_attrs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def extendMarkdown(self, md):
7070
| [`LegacyAttrs`][markdown.extensions.legacy_attrs.LegacyAttrs] | [`treeprocessors`][markdown.treeprocessors.build_treeprocessors] | `legacyattrs` | `15` |
7171
7272
"""
73+
# flake8: noqa: E501 68-70
7374
md.treeprocessors.register(LegacyAttrs(md), 'legacyattrs', 15)
7475

7576

markdown/extensions/legacy_em.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def extendMarkdown(self, md):
5050
| [`LegacyUnderscoreProcessor`][markdown.extensions.legacy_em.LegacyUnderscoreProcessor] | [`inlinepatterns`][markdown.inlinepatterns.build_inlinepatterns] | `em_strong2` | `50` |
5151
5252
"""
53+
# flake8: noqa: E501 48-50
5354
md.inlinePatterns.register(LegacyUnderscoreProcessor(r'_'), 'em_strong2', 50)
5455

5556

markdown/extensions/md_in_html.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ def extendMarkdown(self, md):
433433
| [`MarkdownInHTMLPostprocessor`][markdown.extensions.md_in_html.MarkdownInHTMLPostprocessor] | [`postprocessors`][markdown.postprocessors.build_postprocessors] | `raw_html` | `30` |
434434
435435
"""
436-
436+
# flake8: noqa: E501 429-433
437437
# Replace raw HTML preprocessor
438438
md.preprocessors.register(HtmlBlockPreprocessor(md), 'html_block', 20)
439439
# Add `blockprocessor` which handles the placeholders for `etree` elements

0 commit comments

Comments
 (0)