Skip to content

Commit

Permalink
Add known-first-party isort config (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja committed Oct 16, 2023
1 parent b1eef73 commit c8ab8c3
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 13 deletions.
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0
rev: v3.0.3
hooks:
- id: prettier
types_or:
Expand All @@ -16,7 +16,7 @@ repos:
minimum_pre_commit_version: 2.9.0
exclude: ^locale
- repo: https://github.com/mondeja/project-config
rev: v0.8.0
rev: v0.9.2
hooks:
- id: project-config
- repo: meta
Expand All @@ -26,25 +26,25 @@ 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
- id: end-of-file-fixer
name: end-of-file-fixer
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.290
rev: v0.0.292
hooks:
- id: ruff
args:
- --fix
- --exit-non-zero-on-fix
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.2
rev: v2.0.4
hooks:
- id: autopep8
- repo: https://github.com/mondeja/mdpo
rev: v1.1.3
rev: v1.1.4
hooks:
- id: md2po2md
files: ^README\.md
Expand All @@ -67,19 +67,19 @@ repos:
hooks:
- id: yamllint
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.8.1
rev: v0.10.0
hooks:
- id: markdownlint-cli2
name: markdownlint-readme
files: ^README.md
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 2.7.2
rev: 2.7.3
hooks:
- id: editorconfig-checker
name: editorconfig-checker
alias: ec
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
rev: v1.6.0
hooks:
- id: mypy
files: ^src
Expand Down
7 changes: 4 additions & 3 deletions pyproject.toml
Expand Up @@ -103,9 +103,9 @@ targets = [{ file = "pyproject.toml" }]
[tool.project-config]
cache = "2 days"
style = [
"gh://mondeja/project-config-styles@v5/base/pre-commit/md2po2md.json5",
"gh://mondeja/project-config-styles@v5/python/base.json5",
"gh://mondeja/project-config-styles@v5/python/mypy.json5",
"gh://mondeja/project-config-styles@v5.1/base/pre-commit/md2po2md.json5",
"gh://mondeja/project-config-styles@v5.1/python/base.json5",
"gh://mondeja/project-config-styles@v5.1/python/mypy.json5",
]

[tool.coverage.run]
Expand Down Expand Up @@ -165,6 +165,7 @@ parametrize-values-row-type = "tuple"
lines-after-imports = 2
combine-as-imports = true
force-wrap-aliases = true
known-first-party = ["mkdocs_include_markdown_plugin", "testing_helpers"]
known-local-folder = ["tests"]
required-imports = ["from __future__ import annotations"]
extra-standard-library = [
Expand Down
3 changes: 2 additions & 1 deletion tests/test_integration/test_cache_integration.py
@@ -1,9 +1,10 @@
import os
from dataclasses import dataclass

import mkdocs_include_markdown_plugin.cache
import pytest
from mkdocs.exceptions import PluginError

import mkdocs_include_markdown_plugin.cache
from mkdocs_include_markdown_plugin import IncludeMarkdownPlugin
from mkdocs_include_markdown_plugin.cache import (
CACHE_AVAILABLE,
Expand Down
1 change: 1 addition & 0 deletions tests/test_integration/test_examples.py
Expand Up @@ -6,6 +6,7 @@
from mkdocs import config
from mkdocs.commands.build import build
from mkdocs.exceptions import Abort

from mkdocs_include_markdown_plugin.cache import CACHE_AVAILABLE
from testing_helpers import rootdir

Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_arguments.py
Expand Up @@ -4,6 +4,7 @@

import pytest
from mkdocs.exceptions import PluginError

from mkdocs_include_markdown_plugin.event import on_page_markdown
from testing_helpers import parametrize_directives, unix_only

Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_config.py
@@ -1,6 +1,7 @@
"""``include`` directive tests."""

import pytest

from mkdocs_include_markdown_plugin.event import on_page_markdown
from testing_helpers import unix_only

Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_encoding.py
@@ -1,4 +1,5 @@
import pytest

from mkdocs_include_markdown_plugin.event import on_page_markdown
from testing_helpers import parametrize_directives, unix_only

Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_exclude.py
Expand Up @@ -6,6 +6,7 @@

import pytest
from mkdocs.exceptions import PluginError

from mkdocs_include_markdown_plugin.event import on_page_markdown
from testing_helpers import parametrize_directives, unix_only

Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_glob_include.py
Expand Up @@ -3,6 +3,7 @@
import os

import pytest

from mkdocs_include_markdown_plugin.event import on_page_markdown
from testing_helpers import parametrize_directives, unix_only

Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_include.py
@@ -1,6 +1,7 @@
"""``include`` directive tests."""

import pytest

from mkdocs_include_markdown_plugin.event import on_page_markdown


Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_include_markdown.py
@@ -1,6 +1,7 @@
"""``include-markdown`` directive tests"""

import pytest

from mkdocs_include_markdown_plugin.event import on_page_markdown


Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_logging.py
@@ -1,6 +1,7 @@
"""Logging tests."""

import pytest

from mkdocs_include_markdown_plugin.event import on_page_markdown
from testing_helpers import parametrize_directives

Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_nested_includes.py
@@ -1,6 +1,7 @@
"""Nested inclusion tests."""

import pytest

from mkdocs_include_markdown_plugin.event import on_page_markdown


Expand Down
1 change: 1 addition & 0 deletions tests/test_unit/test_process.py
@@ -1,6 +1,7 @@
"""String processing tests."""

import pytest

from mkdocs_include_markdown_plugin.cache import Cache
from mkdocs_include_markdown_plugin.process import (
increase_headings_offset,
Expand Down

0 comments on commit c8ab8c3

Please sign in to comment.