From 523aac6a08f2f75ec1f1bc67f1d367da915aad0c Mon Sep 17 00:00:00 2001 From: Joel Falknau Date: Sat, 24 May 2025 15:31:54 +1000 Subject: [PATCH] drop Ruff, i thought it was cool, kinda unnecessary --- .pre-commit-config.yaml | 25 ++++++++++------------- pyproject.toml | 44 ----------------------------------------- 2 files changed, 10 insertions(+), 59 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2ddfe584..abebc6f7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,20 +24,14 @@ exclude: | ) repos: - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.4 - hooks: - # Run the linter, and only the linter - - id: ruff - + # Code Upgrades - repo: https://github.com/adamchainz/django-upgrade - rev: 1.24.0 + rev: 1.25.0 hooks: - id: django-upgrade - args: [--target-version=5.1] - - - repo: https://github.com/asottile/pyupgrade # Ruff doesnt get everything. - rev: v3.19.1 + args: [--target-version=5.2] + - repo: https://github.com/asottile/pyupgrade + rev: v3.20.0 hooks: - id: pyupgrade args: [--py310-plus] @@ -59,7 +53,7 @@ repos: - id: detect-private-key - id: check-case-conflict # Python checks -# +# - id: check-docstring-first - id: debug-statements # - id: requirements-txt-fixer - id: fix-encoding-pragma @@ -77,21 +71,22 @@ repos: hooks: - id: editorconfig-checker - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.44.0 + rev: v0.45.0 hooks: - id: markdownlint language: node args: - --disable=MD013 + # Infrastructure - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.5.1 + rev: v2.6.0 hooks: - id: pyproject-fmt args: - --indent=4 additional_dependencies: - - tox==4.24.1 # https://github.com/tox-dev/tox/releases/latest + - tox==4.26.0 # https://github.com/tox-dev/tox/releases/latest - repo: https://github.com/tox-dev/tox-ini-fmt rev: 1.5.0 hooks: diff --git a/pyproject.toml b/pyproject.toml index 2fd29ad7..a1d4c335 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,50 +87,6 @@ scripts.allianceauth = "allianceauth.bin.allianceauth:main" [tool.flit.module] name = "allianceauth" -[tool.ruff] -line-length = 119 -format.line-ending = "lf" -lint.select = [ - "B", # flake8-bugbear - "C", # pylint convention - # "D", # pydocstyle, Want to turn these on, but our docstrings are lightly used - "D300", # use triple double-quotes in docstrings PEP 257 - "DJ", # flake8-django - "DOC", # pylintdoc - "E", # pycodestyle error - "F", # pyflakes (flake8 base) - "G010", # logging-warn, Warn on using logging.warn - "I", # isort - "PGH005", # pygrep-hooks, python-check-mock-method - "RUF100", # basically yesqa - "UP", # pyupgrade, will target requires-python - "W", # pycodestyle Warning -] -lint.ignore = [ - "E501", # Line too long, WIP across repo. -] - -lint.per-file-ignores = { "*local.py" = [ "F405", "F403" ] } - -lint.isort.combine-as-imports = true # profile=django -lint.isort.section-order = [ - "future", - "standard-library", - "third-party", - "DJANGO", - "ESI", - "first-party", - "local-folder", -] -lint.isort.sections."DJANGO" = [ - "django", - "django_redis", - "django_registration", -] -lint.isort.sections."ESI" = [ - "esi", -] - [tool.isort] profile = "django" sections = [