Merge branch 'pre-commit-updates' into 'master'

Pre commit updates

See merge request allianceauth/allianceauth!1682
This commit is contained in:
Ariel Rin 2025-02-11 05:15:48 +00:00
commit cb57d922e6
2 changed files with 34 additions and 40 deletions

View File

@ -3,22 +3,41 @@
# Update this file: # Update this file:
# pre-commit autoupdate # pre-commit autoupdate
# Set the default language versions for the hooks
default_language_version:
python: python3 # Force all Python hooks to use Python 3
node: 22.12.0 # Force all Node hooks to use Node 22.12.0
# Globally exclude files
# https://pre-commit.com/#top_level-exclude
exclude: |
(?x)(
LICENSE|
allianceauth\/static\/allianceauth\/css\/themes\/bootstrap-locals.less|
\.min\.css|
\.min\.js|
\.po|
\.mo|
swagger\.json|
static/(.*)/libs/
)
repos: repos:
# Code Upgrades # Code Upgrades
- repo: https://github.com/asottile/pyupgrade - repo: https://github.com/asottile/pyupgrade
rev: v3.15.2 rev: v3.19.1
hooks: hooks:
- id: pyupgrade - id: pyupgrade
args: [--py38-plus] args: [--py38-plus]
- repo: https://github.com/adamchainz/django-upgrade - repo: https://github.com/adamchainz/django-upgrade
rev: 1.17.0 rev: 1.22.2
hooks: hooks:
- id: django-upgrade - id: django-upgrade
args: [--target-version=4.2] args: [--target-version=4.2]
# Formatting # Formatting
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0 rev: v5.0.0
hooks: hooks:
# Identify invalid files # Identify invalid files
- id: check-ast - id: check-ast
@ -44,48 +63,22 @@ repos:
args: [--fix=lf] args: [--fix=lf]
- id: trailing-whitespace - id: trailing-whitespace
args: [--markdown-linebreak-ext=md] args: [--markdown-linebreak-ext=md]
exclude: |
(?x)(
\.min\.css|
\.min\.js|
\.po|
\.mo|
swagger\.json|
static/(.*)/libs/
)
- id: check-executables-have-shebangs - id: check-executables-have-shebangs
- id: end-of-file-fixer - id: end-of-file-fixer
exclude: |
(?x)(
\.min\.css|
\.min\.js|
\.po|
\.mo|
swagger\.json|
static/(.*)/libs/
)
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python - repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 2.7.3 rev: 3.2.0
hooks: hooks:
- id: editorconfig-checker - id: editorconfig-checker
exclude: |
(?x)(
LICENSE|
allianceauth\/static\/allianceauth\/css\/themes\/bootstrap-locals.less|
\.po|
\.mo|
swagger\.json|
static/(.*)/libs/
)
- repo: https://github.com/igorshubovych/markdownlint-cli - repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0 rev: v0.44.0
hooks: hooks:
- id: markdownlint - id: markdownlint
language: node
args: args:
- --disable=MD013 - --disable=MD013
# Infrastructure # Infrastructure
- repo: https://github.com/tox-dev/pyproject-fmt - repo: https://github.com/tox-dev/pyproject-fmt
rev: 2.1.3 rev: v2.5.0
hooks: hooks:
- id: pyproject-fmt - id: pyproject-fmt
name: pyproject.toml formatter name: pyproject.toml formatter
@ -93,9 +86,9 @@ repos:
args: args:
- --indent=4 - --indent=4
additional_dependencies: additional_dependencies:
- tox==4.15.0 # https://github.com/tox-dev/tox/releases/latest - tox==4.24.1 # https://github.com/tox-dev/tox/releases/latest
- repo: https://github.com/abravalheri/validate-pyproject - repo: https://github.com/abravalheri/validate-pyproject
rev: v0.18 rev: v0.23
hooks: hooks:
- id: validate-pyproject - id: validate-pyproject
name: Validate pyproject.toml name: Validate pyproject.toml

View File

@ -1,7 +1,7 @@
[build-system] [build-system]
build-backend = "flit_core.buildapi" build-backend = "flit_core.buildapi"
requires = [ requires = [
"flit-core<4,>=3.2", "flit-core>=3.2,<4",
] ]
[project] [project]
@ -31,6 +31,7 @@ classifiers = [
"Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
] ]
@ -41,15 +42,15 @@ dynamic = [
dependencies = [ dependencies = [
"bcrypt", "bcrypt",
"beautifulsoup4", "beautifulsoup4",
"celery<6,>=5.2", "celery>=5.2,<6",
"celery-once>=3.0.1", "celery-once>=3.0.1",
"django<5,>=4.2", "django>=4.2,<5",
"django-bootstrap-form", "django-bootstrap-form",
"django-bootstrap5>=23.3", "django-bootstrap5>=23.3",
"django-celery-beat>=2.3", "django-celery-beat>=2.3",
"django-esi>=5", "django-esi>=5",
"django-redis>=5.2", "django-redis>=5.2",
"django-registration<3.4,>=3.3", "django-registration>=3.3,<3.4",
"django-solo", "django-solo",
"django-sortedm2m", "django-sortedm2m",
"django-sri", "django-sri",
@ -70,7 +71,7 @@ optional-dependencies.docs = [
"myst-parser", "myst-parser",
"sphinx", "sphinx",
"sphinx-copybutton", "sphinx-copybutton",
"sphinx-rtd-theme<3,>=2", "sphinx-rtd-theme>=2,<3",
"sphinx-tabs", "sphinx-tabs",
"sphinxcontrib-django", "sphinxcontrib-django",
] ]