From a433971ac55c4c7d0be2bc11a7fa98fe952b6310 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 22:16:19 +0000 Subject: [PATCH 1/3] [pre-commit.ci] pre-commit suggestions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v4.6.0) - [github.com/pre-commit/mirrors-prettier: v3.1.0 → v4.0.0-alpha.8](https://github.com/pre-commit/mirrors-prettier/compare/v3.1.0...v4.0.0-alpha.8) - [github.com/codespell-project/codespell: v2.2.6 → v2.3.0](https://github.com/codespell-project/codespell/compare/v2.2.6...v2.3.0) - [github.com/astral-sh/ruff-pre-commit: v0.3.2 → v0.5.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.3.2...v0.5.2) - [github.com/tox-dev/pyproject-fmt: 1.7.0 → 2.1.4](https://github.com/tox-dev/pyproject-fmt/compare/1.7.0...2.1.4) - [github.com/abravalheri/validate-pyproject: v0.16 → v0.18](https://github.com/abravalheri/validate-pyproject/compare/v0.16...v0.18) --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2ac5c20e..67d5688d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: end-of-file-fixer - id: trailing-whitespace @@ -21,7 +21,7 @@ repos: - id: detect-private-key - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.1.0 + rev: v4.0.0-alpha.8 hooks: - id: prettier files: \.(json|yml|yaml|toml) @@ -29,7 +29,7 @@ repos: args: ["--print-width=120"] - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell additional_dependencies: [tomli] @@ -45,17 +45,17 @@ repos: - mdformat_frontmatter - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.3.2 + rev: v0.5.2 hooks: - id: ruff-format - id: ruff args: ["--fix"] - repo: https://github.com/tox-dev/pyproject-fmt - rev: 1.7.0 + rev: 2.1.4 hooks: - id: pyproject-fmt - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.16 + rev: v0.18 hooks: - id: validate-pyproject From e097bac9993c33d2a0c958367021bc6b0e298b9c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 22:16:35 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyproject.toml | 108 +++++++++++++++++++++++++------------------------ 1 file changed, 56 insertions(+), 52 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d4435819..68403f77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,55 +8,59 @@ target-version = "py38" line-length = 120 # Enable Pyflakes `E` and `F` codes by default. lint.select = [ - "E", "W", # see: https://pypi.org/project/pycodestyle - "F", # see: https://pypi.org/project/pyflakes - "I", #see: https://pypi.org/project/isort/ - "D", # see: https://pypi.org/project/pydocstyle - "N", # see: https://pypi.org/project/pep8-naming - "S", # see: https://pypi.org/project/flake8-bandit - "UP", # see: https://docs.astral.sh/ruff/rules/#pyupgrade-up + "D", # see: https://pypi.org/project/pydocstyle + "E", + "F", # see: https://pypi.org/project/pyflakes + "I", #see: https://pypi.org/project/isort/ + "N", # see: https://pypi.org/project/pep8-naming + "S", # see: https://pypi.org/project/flake8-bandit + "UP", # see: https://docs.astral.sh/ruff/rules/#pyupgrade-up + "W", # see: https://pypi.org/project/pycodestyle ] lint.extend-select = [ - "A", # see: https://pypi.org/project/flake8-builtins - "B", # see: https://pypi.org/project/flake8-bugbear - "C4", # see: https://pypi.org/project/flake8-comprehensions - "PT", # see: https://pypi.org/project/flake8-pytest-style - "RET", # see: https://pypi.org/project/flake8-return - "SIM", # see: https://pypi.org/project/flake8-simplify - "YTT", # see: https://pypi.org/project/flake8-2020 - "ANN", # see: https://pypi.org/project/flake8-annotations - "TID", # see: https://pypi.org/project/flake8-tidy-imports/ - "T10", # see: https://pypi.org/project/flake8-debugger - "Q", # see: https://pypi.org/project/flake8-quotes - "EXE", # see: https://pypi.org/project/flake8-executable - "ISC", # see: https://pypi.org/project/flake8-implicit-str-concat - "PIE", # see: https://pypi.org/project/flake8-pie - "PLE", # see: https://pypi.org/project/pylint/ - "PERF", # see: https://pypi.org/project/perflint/ - "PYI", # see: https://pypi.org/project/flake8-pyi/ - "RUF", # see: https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf + "A", # see: https://pypi.org/project/flake8-builtins + "ANN", # see: https://pypi.org/project/flake8-annotations + "B", # see: https://pypi.org/project/flake8-bugbear + "C4", # see: https://pypi.org/project/flake8-comprehensions + "EXE", # see: https://pypi.org/project/flake8-executable + "ISC", # see: https://pypi.org/project/flake8-implicit-str-concat + "PERF", # see: https://pypi.org/project/perflint/ + "PIE", # see: https://pypi.org/project/flake8-pie + "PLE", # see: https://pypi.org/project/pylint/ + "PT", # see: https://pypi.org/project/flake8-pytest-style + "PYI", # see: https://pypi.org/project/flake8-pyi/ + "Q", # see: https://pypi.org/project/flake8-quotes + "RET", # see: https://pypi.org/project/flake8-return + "RUF", # see: https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf + "SIM", # see: https://pypi.org/project/flake8-simplify + "T10", # see: https://pypi.org/project/flake8-debugger + "TID", # see: https://pypi.org/project/flake8-tidy-imports/ + "YTT", # see: https://pypi.org/project/flake8-2020 ] -lint.ignore-init-module-imports = true -lint.unfixable = ["F401"] lint.ignore = [ - "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` + "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` ] -[tool.ruff.lint.per-file-ignores] -"setup.py" = ["D100", "SIM115"] -"__about__.py" = ["D100"] -"__init__.py" = ["D100"] - -[tool.ruff.lint.pydocstyle] -# Use Google-style docstrings. -convention = "google" - +lint.per-file-ignores."__about__.py" = [ + "D100", +] +lint.per-file-ignores."__init__.py" = [ + "D100", +] #[tool.ruff.pycodestyle] #ignore-overlong-task-comments = true - -[tool.ruff.lint.mccabe] +lint.per-file-ignores."setup.py" = [ + "D100", + "SIM115", +] +lint.unfixable = [ + "F401", +] # Unlike Flake8, default to a complexity level of 10. -max-complexity = 10 +lint.mccabe.max-complexity = 10 +# Use Google-style docstrings. +lint.pydocstyle.convention = "google" +lint.ignore-init-module-imports = true [tool.isort] profile = "black" @@ -75,18 +79,18 @@ quiet-level = 3 [tool.pytest.ini_options] norecursedirs = [ - ".git", - ".github", - "dist", - "build", - "docs", + ".git", + ".github", + "dist", + "build", + "docs", ] addopts = [ - "--strict-markers", - "--doctest-modules", - # "--doctest-plus", - "--color=yes", - "--disable-pytest-warnings", + "--strict-markers", + "--doctest-modules", + # "--doctest-plus", + "--color=yes", + "--disable-pytest-warnings", ] # ToDo #filterwarnings = ["error::FutureWarning"] @@ -95,6 +99,6 @@ junit_duration_report = "call" [tool.coverage.report] exclude_lines = [ - "pragma: no cover", - "pass", + "pragma: no cover", + "pass", ] From bd5bb932d33128b721247778e07a399099b5c1d5 Mon Sep 17 00:00:00 2001 From: Jirka Borovec <6035284+Borda@users.noreply.github.com> Date: Thu, 18 Jul 2024 21:47:48 +0200 Subject: [PATCH 3/3] Apply suggestions from code review --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 67d5688d..8e993df5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: - id: detect-private-key - repo: https://github.com/pre-commit/mirrors-prettier - rev: v4.0.0-alpha.8 + rev: v3.1.0 hooks: - id: prettier files: \.(json|yml|yaml|toml)