From fb189f5a95a7bcf57381636b64d7983960d455e4 Mon Sep 17 00:00:00 2001 From: Jirka B Date: Fri, 6 Sep 2024 21:34:26 +0200 Subject: [PATCH] ci/lint: update --- .pre-commit-config.yaml | 28 +++------------------------- pyproject.toml | 9 +++------ 2 files changed, 6 insertions(+), 31 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d665edb5..947304e8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,13 +21,6 @@ repos: - id: check-docstring-first - id: detect-private-key - - repo: https://github.com/asottile/pyupgrade - rev: v3.16.0 - hooks: - - id: pyupgrade - args: ["--py38-plus"] - name: Upgrade code - - repo: https://github.com/codespell-project/codespell rev: v2.3.0 hooks: @@ -42,36 +35,21 @@ repos: additional_dependencies: [tomli] args: ["--in-place"] - - repo: https://github.com/psf/black - rev: 24.4.2 - hooks: - - id: black - name: Black code - - repo: https://github.com/executablebooks/mdformat rev: 0.7.17 hooks: - id: mdformat + args: ["--number"] additional_dependencies: - mdformat-gfm - mdformat-black - mdformat_frontmatter exclude: CHANGELOG.md - - repo: https://github.com/asottile/yesqa - rev: v1.5.0 - hooks: - - id: yesqa - additional_dependencies: - - pep8-naming - - pydocstyle - #- flake8-comprehensions - #- flake8-pytest-style - #- flake8-return - #- flake8-simplify - - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.5.0 hooks: - id: ruff args: ["--fix"] + - id: ruff-format + args: ["--fix"] diff --git a/pyproject.toml b/pyproject.toml index cfbb84e5..2285bf2e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,12 +55,6 @@ wrap-descriptions = 120 blank = true -[tool.black] -# https://github.com/psf/black -line-length = 120 -exclude = "(.eggs|.git|.hg|.mypy_cache|.venv|_build|buck-out|build|dist)" - - [tool.mypy] files = [ "src", @@ -81,6 +75,7 @@ warn_no_return = false [tool.ruff] +target-version = "py38" line-length = 120 [tool.ruff.lint] @@ -96,6 +91,8 @@ extend-select = [ "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 + "UP", # pyupgrade + "RUF100", # yesqa ] ignore = [ "E731", # Do not assign a lambda expression, use a def