From 02a2e75a8d49c3bafe25ecf75455ff7746a3534b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Mon, 5 Feb 2024 11:34:32 -0600 Subject: [PATCH] chore: Remove redundant pre-commit hooks --- .flake8 | 4 ---- .pre-commit-config.yaml | 11 +---------- pyproject.toml | 18 ++++++++++-------- 3 files changed, 11 insertions(+), 22 deletions(-) delete mode 100644 .flake8 diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 5a1bf64..0000000 --- a/.flake8 +++ /dev/null @@ -1,4 +0,0 @@ -[flake8] -select = DAR -docstring-convention = google -max-line-length = 88 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 30b6306..e549926 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,11 +31,7 @@ repos: hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - -- repo: https://github.com/psf/black - rev: 24.1.1 - hooks: - - id: black + - id: ruff-format - repo: https://github.com/tox-dev/pyproject-fmt rev: "1.7.0" @@ -49,8 +45,3 @@ repos: additional_dependencies: - typing-extensions - sqlalchemy[mypy] - -- repo: https://github.com/pycqa/flake8 - rev: 7.0.0 - hooks: - - id: flake8 diff --git a/pyproject.toml b/pyproject.toml index 6c222c5..8691c37 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,10 @@ python_version = "3.9" warn_unused_configs = true [tool.ruff] +line-length = 88 +target-version = "py38" + +[tool.ruff.lint] select = [ "F", "W", @@ -86,28 +90,26 @@ ignore = [ unfixable = [ "ERA", # commented-out-code ] -line-length = 88 -target-version = "py37" -[tool.ruff.flake8-import-conventions] +[tool.ruff.lint.flake8-import-conventions] banned-from = ["typing"] -[tool.ruff.flake8-import-conventions.extend-aliases] +[tool.ruff.lint.flake8-import-conventions.extend-aliases] "typing" = "t" -[tool.ruff.isort] +[tool.ruff.lint.isort] required-imports = ["from __future__ import annotations"] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "tests/*" = ["S101"] -[tool.ruff.pydocstyle] +[tool.ruff.lint.pydocstyle] convention = "google" [build-system] build-backend = "poetry.core.masonry.api" requires = [ - "poetry-core==1.6.*", + "poetry-core==1.9", ] [tool.poetry.scripts]