Skip to content

Commit 063268b

Browse files
authored
🔧 MAINTAIN: Add isort hook (#210)
1 parent cb2eee1 commit 063268b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+79
-81
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ repos:
2323
- id: end-of-file-fixer
2424
- id: trailing-whitespace
2525

26+
- repo: https://github.com/pycqa/isort
27+
rev: 5.10.1
28+
hooks:
29+
- id: isort
30+
2631
- repo: https://github.com/psf/black
2732
rev: 22.3.0
2833
hooks:

benchmarking/bench_core.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from pathlib import Path
2+
23
import pytest
34

45
import markdown_it

benchmarking/bench_packages.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from pathlib import Path
2-
import pytest
32
from shutil import which
43

4+
import pytest
5+
56

67
@pytest.fixture
78
def spec_text():

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def run_apidoc(app):
9292
"""
9393
import os
9494
import shutil
95+
9596
import sphinx
9697
from sphinx.ext import apidoc
9798

markdown_it/cli/parse.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from markdown_it import __version__
1414
from markdown_it.main import MarkdownIt
1515

16-
1716
version_str = "markdown-it-py [version {}]".format(__version__)
1817

1918

markdown_it/common/normalize_url.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22

33
from collections.abc import Callable
44
import re
5-
from urllib.parse import urlparse, urlunparse, quote, unquote # noqa: F401
5+
from urllib.parse import quote, unquote, urlparse, urlunparse # noqa: F401
66

77
import mdurl
88

99
from .. import _punycode
1010

11-
1211
RECODE_HOSTNAME_FOR = ("http:", "https:", "mailto:")
1312

1413

markdown_it/helpers/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Functions for parsing Links
22
"""
33
__all__ = ("parseLinkLabel", "parseLinkDestination", "parseLinkTitle")
4-
from .parse_link_label import parseLinkLabel
54
from .parse_link_destination import parseLinkDestination
5+
from .parse_link_label import parseLinkLabel
66
from .parse_link_title import parseLinkTitle

markdown_it/helpers/parse_link_destination.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Parse link destination
33
"""
44

5-
from ..common.utils import unescapeAll, charCodeAt
5+
from ..common.utils import charCodeAt, unescapeAll
66

77

88
class _Result:

markdown_it/helpers/parse_link_title.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Parse link title
22
"""
3-
from ..common.utils import unescapeAll, charCodeAt
3+
from ..common.utils import charCodeAt, unescapeAll
44

55

66
class _Result:

markdown_it/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
from __future__ import annotations
22

3-
from contextlib import contextmanager
43
from collections.abc import Callable, Generator, Iterable, Mapping, MutableMapping
4+
from contextlib import contextmanager
55
from typing import Any
66

77
from . import helpers, presets # noqa F401
88
from .common import normalize_url, utils # noqa F401
9-
from .token import Token
10-
from .parser_core import ParserCore # noqa F401
119
from .parser_block import ParserBlock # noqa F401
10+
from .parser_core import ParserCore # noqa F401
1211
from .parser_inline import ParserInline # noqa F401
13-
from .rules_core.state_core import StateCore
1412
from .renderer import RendererHTML, RendererProtocol
13+
from .rules_core.state_core import StateCore
14+
from .token import Token
1515
from .utils import OptionsDict
1616

1717
try:

0 commit comments

Comments
 (0)