From f5036baf4fb9d740f447e933d091180d40a7302f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Mond=C3=A9jar=20Rubio?= Date: Mon, 16 Oct 2023 05:07:47 +0200 Subject: [PATCH] Add `known-first-party` isort config --- .pre-commit-config.yaml | 6 +++--- pyproject.toml | 7 ++++--- tests/test_unit/test_cli.py | 1 + tests/test_unit/test_command.py | 1 + tests/test_unit/test_event.py | 1 + tests/test_unit/test_io.py | 1 + .../test_md2po/test_commands/test_md2po_codeblocks.py | 1 + .../test_md2po/test_commands/test_md2po_context.py | 1 + .../test_md2po/test_commands/test_md2po_disable.py | 1 + .../test_md2po/test_commands/test_md2po_include.py | 1 + .../test_md2po/test_commands/test_md2po_translator.py | 1 + tests/test_unit/test_md2po/test_extract.py | 1 + tests/test_unit/test_md2po/test_extractor.py | 1 + tests/test_unit/test_md2po/test_md2po_cli.py | 1 + tests/test_unit/test_md2po/test_md2po_events.py | 1 + tests/test_unit/test_md2po/test_obsoletes.py | 1 + tests/test_unit/test_md2po2md/test_md2po2md_cli.py | 1 + .../test_mdpo2html/test_commands/test_mdpo2html_context.py | 1 + .../test_mdpo2html/test_commands/test_mdpo2html_disable.py | 1 + .../test_commands/test_mdpo2html_include_codeblock.py | 1 + tests/test_unit/test_mdpo2html/test_mdpo2html_cli.py | 1 + tests/test_unit/test_mdpo2html/test_mdpo2html_translate.py | 1 + tests/test_unit/test_po.py | 1 + .../test_po2md/test_commands/test_po2md_context.py | 1 + .../test_po2md/test_commands/test_po2md_disable.py | 1 + tests/test_unit/test_po2md/test_po2md_cli.py | 1 + tests/test_unit/test_po2md/test_po2md_translate.py | 1 + tests/test_unit/test_po2md/test_po2md_wrapwidth.py | 1 + tests/test_unit/test_text.py | 1 + 29 files changed, 34 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 11b32b25..b93745f8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -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 @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 7cd20c67..81d9598e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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] @@ -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", diff --git a/tests/test_unit/test_cli.py b/tests/test_unit/test_cli.py index 42f3c7e0..7803cbc0 100644 --- a/tests/test_unit/test_cli.py +++ b/tests/test_unit/test_cli.py @@ -1,4 +1,5 @@ import pytest + from mdpo.cli import parse_command_aliases_cli_arguments diff --git a/tests/test_unit/test_command.py b/tests/test_unit/test_command.py index 05c62ca7..ba313f28 100644 --- a/tests/test_unit/test_command.py +++ b/tests/test_unit/test_command.py @@ -1,6 +1,7 @@ """HTML mdpo command utitlites tests.""" import pytest + from mdpo.command import ( get_valid_mdpo_command_names, normalize_mdpo_command, diff --git a/tests/test_unit/test_event.py b/tests/test_unit/test_event.py index e75c4c80..42ba918d 100644 --- a/tests/test_unit/test_event.py +++ b/tests/test_unit/test_event.py @@ -2,6 +2,7 @@ import io import pytest + from mdpo.event import parse_events_kwarg from mdpo.md2po import markdown_to_pofile diff --git a/tests/test_unit/test_io.py b/tests/test_unit/test_io.py index af1bd4e9..548d7e18 100644 --- a/tests/test_unit/test_io.py +++ b/tests/test_unit/test_io.py @@ -5,6 +5,7 @@ import os import pytest + from mdpo.io import ( filter_paths, save_file_checking_file_changed, diff --git a/tests/test_unit/test_md2po/test_commands/test_md2po_codeblocks.py b/tests/test_unit/test_md2po/test_commands/test_md2po_codeblocks.py index 02b3c2e4..51335b8c 100644 --- a/tests/test_unit/test_md2po/test_commands/test_md2po_codeblocks.py +++ b/tests/test_unit/test_md2po/test_commands/test_md2po_codeblocks.py @@ -1,4 +1,5 @@ import pytest + from mdpo.md2po import markdown_to_pofile diff --git a/tests/test_unit/test_md2po/test_commands/test_md2po_context.py b/tests/test_unit/test_md2po/test_commands/test_md2po_context.py index 600f0db3..e7546606 100644 --- a/tests/test_unit/test_md2po/test_commands/test_md2po_context.py +++ b/tests/test_unit/test_md2po/test_commands/test_md2po_context.py @@ -1,4 +1,5 @@ import pytest + from mdpo.md2po import markdown_to_pofile diff --git a/tests/test_unit/test_md2po/test_commands/test_md2po_disable.py b/tests/test_unit/test_md2po/test_commands/test_md2po_disable.py index 34864762..c58b01ed 100644 --- a/tests/test_unit/test_md2po/test_commands/test_md2po_disable.py +++ b/tests/test_unit/test_md2po/test_commands/test_md2po_disable.py @@ -1,4 +1,5 @@ import pytest + from mdpo.md2po import Md2Po, markdown_to_pofile diff --git a/tests/test_unit/test_md2po/test_commands/test_md2po_include.py b/tests/test_unit/test_md2po/test_commands/test_md2po_include.py index 8bd3f905..4e42b589 100644 --- a/tests/test_unit/test_md2po/test_commands/test_md2po_include.py +++ b/tests/test_unit/test_md2po/test_commands/test_md2po_include.py @@ -1,4 +1,5 @@ import pytest + from mdpo.md2po import markdown_to_pofile diff --git a/tests/test_unit/test_md2po/test_commands/test_md2po_translator.py b/tests/test_unit/test_md2po/test_commands/test_md2po_translator.py index a44d0e9f..e104a565 100644 --- a/tests/test_unit/test_md2po/test_commands/test_md2po_translator.py +++ b/tests/test_unit/test_md2po/test_commands/test_md2po_translator.py @@ -1,4 +1,5 @@ import pytest + from mdpo.md2po import markdown_to_pofile diff --git a/tests/test_unit/test_md2po/test_extract.py b/tests/test_unit/test_md2po/test_extract.py index 76699753..4670faef 100644 --- a/tests/test_unit/test_md2po/test_extract.py +++ b/tests/test_unit/test_md2po/test_extract.py @@ -3,6 +3,7 @@ import random import pytest + from mdpo.md2po import markdown_to_pofile from mdpo.md4c import DEFAULT_MD4C_GENERIC_PARSER_EXTENSIONS diff --git a/tests/test_unit/test_md2po/test_extractor.py b/tests/test_unit/test_md2po/test_extractor.py index 797dbaf4..16b2e337 100644 --- a/tests/test_unit/test_md2po/test_extractor.py +++ b/tests/test_unit/test_md2po/test_extractor.py @@ -1,6 +1,7 @@ import os import pytest + from mdpo.md2po import Md2Po diff --git a/tests/test_unit/test_md2po/test_md2po_cli.py b/tests/test_unit/test_md2po/test_md2po_cli.py index e7eb44dd..d487f573 100644 --- a/tests/test_unit/test_md2po/test_md2po_cli.py +++ b/tests/test_unit/test_md2po/test_md2po_cli.py @@ -7,6 +7,7 @@ import sys import pytest + from mdpo.compat import importlib_metadata from mdpo.md2po.__main__ import run diff --git a/tests/test_unit/test_md2po/test_md2po_events.py b/tests/test_unit/test_md2po/test_md2po_events.py index ea1e6432..d611087f 100644 --- a/tests/test_unit/test_md2po/test_md2po_events.py +++ b/tests/test_unit/test_md2po/test_md2po_events.py @@ -5,6 +5,7 @@ import md4c import pytest + from mdpo.command import normalize_mdpo_command from mdpo.md2po import Md2Po, markdown_to_pofile diff --git a/tests/test_unit/test_md2po/test_obsoletes.py b/tests/test_unit/test_md2po/test_obsoletes.py index 6a20729b..be8f2b08 100644 --- a/tests/test_unit/test_md2po/test_obsoletes.py +++ b/tests/test_unit/test_md2po/test_obsoletes.py @@ -3,6 +3,7 @@ """ import pytest + from mdpo.md2po import markdown_to_pofile diff --git a/tests/test_unit/test_md2po2md/test_md2po2md_cli.py b/tests/test_unit/test_md2po2md/test_md2po2md_cli.py index ab84789b..5214821b 100644 --- a/tests/test_unit/test_md2po2md/test_md2po2md_cli.py +++ b/tests/test_unit/test_md2po2md/test_md2po2md_cli.py @@ -3,6 +3,7 @@ import os import pytest + from mdpo.md2po2md.__main__ import run diff --git a/tests/test_unit/test_mdpo2html/test_commands/test_mdpo2html_context.py b/tests/test_unit/test_mdpo2html/test_commands/test_mdpo2html_context.py index 21c86c9f..d149d312 100644 --- a/tests/test_unit/test_mdpo2html/test_commands/test_mdpo2html_context.py +++ b/tests/test_unit/test_mdpo2html/test_commands/test_mdpo2html_context.py @@ -1,4 +1,5 @@ import pytest + from mdpo.mdpo2html import markdown_pofile_to_html diff --git a/tests/test_unit/test_mdpo2html/test_commands/test_mdpo2html_disable.py b/tests/test_unit/test_mdpo2html/test_commands/test_mdpo2html_disable.py index 051e3819..0de2b8da 100644 --- a/tests/test_unit/test_mdpo2html/test_commands/test_mdpo2html_disable.py +++ b/tests/test_unit/test_mdpo2html/test_commands/test_mdpo2html_disable.py @@ -1,4 +1,5 @@ import pytest + from mdpo.mdpo2html import MdPo2HTML, markdown_pofile_to_html diff --git a/tests/test_unit/test_mdpo2html/test_commands/test_mdpo2html_include_codeblock.py b/tests/test_unit/test_mdpo2html/test_commands/test_mdpo2html_include_codeblock.py index 1229fcdf..c9a34dc5 100644 --- a/tests/test_unit/test_mdpo2html/test_commands/test_mdpo2html_include_codeblock.py +++ b/tests/test_unit/test_mdpo2html/test_commands/test_mdpo2html_include_codeblock.py @@ -3,6 +3,7 @@ """ import pytest + from mdpo.mdpo2html import markdown_pofile_to_html diff --git a/tests/test_unit/test_mdpo2html/test_mdpo2html_cli.py b/tests/test_unit/test_mdpo2html/test_mdpo2html_cli.py index af434e5a..06d66945 100644 --- a/tests/test_unit/test_mdpo2html/test_mdpo2html_cli.py +++ b/tests/test_unit/test_mdpo2html/test_mdpo2html_cli.py @@ -2,6 +2,7 @@ import os import pytest + from mdpo.mdpo2html.__main__ import run diff --git a/tests/test_unit/test_mdpo2html/test_mdpo2html_translate.py b/tests/test_unit/test_mdpo2html/test_mdpo2html_translate.py index 4cef0a9e..f080cb04 100644 --- a/tests/test_unit/test_mdpo2html/test_mdpo2html_translate.py +++ b/tests/test_unit/test_mdpo2html/test_mdpo2html_translate.py @@ -2,6 +2,7 @@ import os import pytest + from mdpo.mdpo2html import markdown_pofile_to_html diff --git a/tests/test_unit/test_po.py b/tests/test_unit/test_po.py index 47e225e6..e81ad099 100644 --- a/tests/test_unit/test_po.py +++ b/tests/test_unit/test_po.py @@ -1,4 +1,5 @@ import pytest + from mdpo.po import po_escaped_string diff --git a/tests/test_unit/test_po2md/test_commands/test_po2md_context.py b/tests/test_unit/test_po2md/test_commands/test_po2md_context.py index b7cc3b6a..732938a6 100644 --- a/tests/test_unit/test_po2md/test_commands/test_po2md_context.py +++ b/tests/test_unit/test_po2md/test_commands/test_po2md_context.py @@ -1,4 +1,5 @@ import pytest + from mdpo.po2md import pofile_to_markdown diff --git a/tests/test_unit/test_po2md/test_commands/test_po2md_disable.py b/tests/test_unit/test_po2md/test_commands/test_po2md_disable.py index 8e7f622d..764b8154 100644 --- a/tests/test_unit/test_po2md/test_commands/test_po2md_disable.py +++ b/tests/test_unit/test_po2md/test_commands/test_po2md_disable.py @@ -1,4 +1,5 @@ import pytest + from mdpo.po2md import Po2Md, pofile_to_markdown diff --git a/tests/test_unit/test_po2md/test_po2md_cli.py b/tests/test_unit/test_po2md/test_po2md_cli.py index f122a8b3..62d49c1b 100644 --- a/tests/test_unit/test_po2md/test_po2md_cli.py +++ b/tests/test_unit/test_po2md/test_po2md_cli.py @@ -5,6 +5,7 @@ import re import pytest + from mdpo.po2md.__main__ import run diff --git a/tests/test_unit/test_po2md/test_po2md_translate.py b/tests/test_unit/test_po2md/test_po2md_translate.py index 1a248b72..a9aa2fe9 100644 --- a/tests/test_unit/test_po2md/test_po2md_translate.py +++ b/tests/test_unit/test_po2md/test_po2md_translate.py @@ -2,6 +2,7 @@ import os import pytest + from mdpo.md2po import markdown_to_pofile from mdpo.po2md import pofile_to_markdown diff --git a/tests/test_unit/test_po2md/test_po2md_wrapwidth.py b/tests/test_unit/test_po2md/test_po2md_wrapwidth.py index 3c41a660..eacf8fac 100644 --- a/tests/test_unit/test_po2md/test_po2md_wrapwidth.py +++ b/tests/test_unit/test_po2md/test_po2md_wrapwidth.py @@ -5,6 +5,7 @@ import os import pytest + from mdpo.po2md import pofile_to_markdown diff --git a/tests/test_unit/test_text.py b/tests/test_unit/test_text.py index acff1b15..da4b18d3 100644 --- a/tests/test_unit/test_text.py +++ b/tests/test_unit/test_text.py @@ -2,6 +2,7 @@ import pytest + from mdpo.text import ( INFINITE_WRAPWIDTH, min_not_max_chars_in_a_row,