diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 90485dd..d905dfb 100644 --- a/.pre-commit-config.yaml +++ b/.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: @@ -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 @@ -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 @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 363a9de..acfdad7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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] @@ -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 = [ diff --git a/tests/test_integration/test_cache_integration.py b/tests/test_integration/test_cache_integration.py index f6e4055..ef599aa 100644 --- a/tests/test_integration/test_cache_integration.py +++ b/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, diff --git a/tests/test_integration/test_examples.py b/tests/test_integration/test_examples.py index 0c0b0d8..4054f4b 100644 --- a/tests/test_integration/test_examples.py +++ b/tests/test_integration/test_examples.py @@ -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 diff --git a/tests/test_unit/test_arguments.py b/tests/test_unit/test_arguments.py index 0d56f18..5ac3e59 100644 --- a/tests/test_unit/test_arguments.py +++ b/tests/test_unit/test_arguments.py @@ -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 diff --git a/tests/test_unit/test_config.py b/tests/test_unit/test_config.py index b93bca7..adb4ed3 100644 --- a/tests/test_unit/test_config.py +++ b/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 diff --git a/tests/test_unit/test_encoding.py b/tests/test_unit/test_encoding.py index 65c4e52..7b125eb 100644 --- a/tests/test_unit/test_encoding.py +++ b/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 diff --git a/tests/test_unit/test_exclude.py b/tests/test_unit/test_exclude.py index 8117588..414d933 100644 --- a/tests/test_unit/test_exclude.py +++ b/tests/test_unit/test_exclude.py @@ -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 diff --git a/tests/test_unit/test_glob_include.py b/tests/test_unit/test_glob_include.py index 11aecc9..3040981 100644 --- a/tests/test_unit/test_glob_include.py +++ b/tests/test_unit/test_glob_include.py @@ -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 diff --git a/tests/test_unit/test_include.py b/tests/test_unit/test_include.py index b77ad27..988f88e 100644 --- a/tests/test_unit/test_include.py +++ b/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 diff --git a/tests/test_unit/test_include_markdown.py b/tests/test_unit/test_include_markdown.py index 5b5e305..2be8ea5 100644 --- a/tests/test_unit/test_include_markdown.py +++ b/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 diff --git a/tests/test_unit/test_logging.py b/tests/test_unit/test_logging.py index 85249f3..7fdb464 100644 --- a/tests/test_unit/test_logging.py +++ b/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 diff --git a/tests/test_unit/test_nested_includes.py b/tests/test_unit/test_nested_includes.py index 1da91f5..6525e2a 100644 --- a/tests/test_unit/test_nested_includes.py +++ b/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 diff --git a/tests/test_unit/test_process.py b/tests/test_unit/test_process.py index e1b2205..a85113c 100644 --- a/tests/test_unit/test_process.py +++ b/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,