Skip to content

Commit

Permalink
Add known-first-party isort config
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja committed Oct 16, 2023
1 parent 17eea9a commit f5036ba
Show file tree
Hide file tree
Showing 29 changed files with 34 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
minimum_pre_commit_version: 2.9.0
exclude: ^tests
- repo: https://github.com/mondeja/project-config
rev: v0.8.0
rev: v0.9.2
hooks:
- id: project-config
- repo: meta
Expand All @@ -26,7 +26,7 @@ repos:
- id: check-useless-excludes
name: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
name: trailing-whitespace
Expand Down Expand Up @@ -55,7 +55,7 @@ repos:
hooks:
- id: yamllint
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 2.7.2
rev: 2.7.3
hooks:
- id: editorconfig-checker
name: editorconfig-checker
Expand Down
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ targets = [{ file = "pyproject.toml" }, { file = "docs/pre-commit-hooks.rst" }]
[tool.project-config]
cache = "2 days"
style = [
"gh://mondeja/project-config-styles@v5/python/base.json5",
"gh://mondeja/project-config-styles@v5/python/sphinx.json5",
"gh://mondeja/project-config-styles@v5/python/readthedocs.json5",
"gh://mondeja/project-config-styles@v5.1/python/base.json5",
"gh://mondeja/project-config-styles@v5.1/python/sphinx.json5",
"gh://mondeja/project-config-styles@v5.1/python/readthedocs.json5",
]

[tool.pytest.ini_options]
Expand Down Expand Up @@ -183,6 +183,7 @@ parametrize-values-row-type = "tuple"
lines-after-imports = 2
combine-as-imports = true
force-wrap-aliases = true
known-first-party = ["mdpo"]
known-local-folder = ["tests"]
extra-standard-library = [
"contextvars",
Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from mdpo.cli import parse_command_aliases_cli_arguments


Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_command.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""HTML mdpo command utitlites tests."""

import pytest

from mdpo.command import (
get_valid_mdpo_command_names,
normalize_mdpo_command,
Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import io

import pytest

from mdpo.event import parse_events_kwarg
from mdpo.md2po import markdown_to_pofile

Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import os

import pytest

from mdpo.io import (
filter_paths,
save_file_checking_file_changed,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from mdpo.md2po import markdown_to_pofile


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from mdpo.md2po import markdown_to_pofile


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from mdpo.md2po import Md2Po, markdown_to_pofile


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from mdpo.md2po import markdown_to_pofile


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from mdpo.md2po import markdown_to_pofile


Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_md2po/test_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import random

import pytest

from mdpo.md2po import markdown_to_pofile
from mdpo.md4c import DEFAULT_MD4C_GENERIC_PARSER_EXTENSIONS

Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_md2po/test_extractor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os

import pytest

from mdpo.md2po import Md2Po


Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_md2po/test_md2po_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import sys

import pytest

from mdpo.compat import importlib_metadata
from mdpo.md2po.__main__ import run

Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_md2po/test_md2po_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import md4c
import pytest

from mdpo.command import normalize_mdpo_command
from mdpo.md2po import Md2Po, markdown_to_pofile

Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_md2po/test_obsoletes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""

import pytest

from mdpo.md2po import markdown_to_pofile


Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_md2po2md/test_md2po2md_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os

import pytest

from mdpo.md2po2md.__main__ import run


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from mdpo.mdpo2html import markdown_pofile_to_html


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from mdpo.mdpo2html import MdPo2HTML, markdown_pofile_to_html


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""

import pytest

from mdpo.mdpo2html import markdown_pofile_to_html


Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_mdpo2html/test_mdpo2html_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os

import pytest

from mdpo.mdpo2html.__main__ import run


Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_mdpo2html/test_mdpo2html_translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os

import pytest

from mdpo.mdpo2html import markdown_pofile_to_html


Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_po.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from mdpo.po import po_escaped_string


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from mdpo.po2md import pofile_to_markdown


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from mdpo.po2md import Po2Md, pofile_to_markdown


Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_po2md/test_po2md_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import re

import pytest

from mdpo.po2md.__main__ import run


Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_po2md/test_po2md_translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os

import pytest

from mdpo.md2po import markdown_to_pofile
from mdpo.po2md import pofile_to_markdown

Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_po2md/test_po2md_wrapwidth.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import os

import pytest

from mdpo.po2md import pofile_to_markdown


Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@


import pytest

from mdpo.text import (
INFINITE_WRAPWIDTH,
min_not_max_chars_in_a_row,
Expand Down

0 comments on commit f5036ba

Please sign in to comment.