Skip to content

Commit

Permalink
Update hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Aug 27, 2024
1 parent db4df68 commit 617274f
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 49 deletions.
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
exclude: ".yarn/|yarn.lock|\\.min\\.(css|js)$"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-builtin-literals
Expand All @@ -14,7 +14,7 @@ repos:
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.16.0
rev: 1.20.0
hooks:
- id: django-upgrade
args: [--target-version, "3.2"]
Expand All @@ -23,7 +23,7 @@ repos:
hooks:
- id: absolufy-imports
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.3.2"
rev: "v0.6.2"
hooks:
- id: ruff
- id: ruff-format
Expand All @@ -34,15 +34,15 @@ repos:
args: [--list-different, --no-semi]
exclude: "^conf/|.*\\.html$"
- repo: https://github.com/biomejs/pre-commit
rev: "v0.1.0"
rev: "v0.4.0"
hooks:
- id: biome-check
additional_dependencies: ["@biomejs/biome@1.7.3"]
additional_dependencies: ["@biomejs/biome@1.8.3"]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.7.0
rev: 2.2.1
hooks:
- id: pyproject-fmt
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.16
rev: v0.19
hooks:
- id: validate-pyproject
82 changes: 40 additions & 42 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ requires = [
name = "form-designer"
description = "Form Designer"
readme = "README.rst"
license = {text= "BSD-3-Clause"}
license = { text = "BSD-3-Clause" }
authors = [
{ name = "Matthias Kestenholz", email = "[email protected]" },
{ name = "Matthias Kestenholz", email = "[email protected]" },
]
requires-python = ">=3.9"
classifiers = [
Expand All @@ -36,80 +36,78 @@ dependencies = [
"django-admin-ordering",
"xlsxdocument",
]
[project.optional-dependencies]
tests = [
optional-dependencies.tests = [
"coverage",
"django-mptt",
"django-recaptcha>=4",
"FeinCMS",
"feincms",
]
[project.urls]
Homepage = "https://github.com/feincms/form-designer/"
urls.Homepage = "https://github.com/feincms/form-designer/"

[tool.hatch.version]
path = "form_designer/__init__.py"

[tool.hatch.build]
include = ["/form_designer"]
include = [ "/form_designer" ]

[tool.ruff]
target-version = "py39"

fix = true
show-fixes = true
lint.extend-select = [
# pyflakes, pycodestyle
"F", "E", "W",
# mmcabe
"C90",
# isort
"I",
# pep8-naming
"N",
# pyupgrade
"UP",
# flake8-2020
"YTT",
# flake8-boolean-trap
"FBT",
# flake8-bugbear
"B",
# flake8-comprehensions
"C4",
# mmcabe
"C90",
# flake8-django
"DJ",
# flake8-implicit-string-concatenation
"ISC",
# flake8-pie
"PIE",
# flake8-simplify
"SIM",
"E",
# pyflakes, pycodestyle
"F",
# flake8-boolean-trap
"FBT",
# isort
"I",
# flake8-gettext
"INT",
# flake8-implicit-string-concatenation
"ISC",
# pep8-naming
"N",
# pygrep-hooks
"PGH",
# flake8-pie
"PIE",
# pylint
"PLC", "PLE", "PLW",
"PLC",
"PLE",
"PLW",
# unused noqa
"RUF100",
# flake8-simplify
"SIM",
# pyupgrade
"UP",
"W",
# flake8-2020
"YTT",
]
lint.extend-ignore = [
# Allow zip() without strict=
"B905",
# No line length errors
"E501",
"UP031",
]
fix = true
show-fixes = true
target-version = "py39"

[tool.ruff.lint.isort]
combine-as-imports = true
lines-after-imports = 2

[tool.ruff.lint.mccabe]
max-complexity = 15

[tool.ruff.lint.per-file-ignores]
"*/migrat*/*" = [
lint.per-file-ignores."*/migrat*/*" = [
# Allow using PascalCase model names in migrations
"N806",
# Ignore the fact that migration files are invalid module names
"N999",
]
lint.isort.combine-as-imports = true
lint.isort.lines-after-imports = 2
lint.mccabe.max-complexity = 15

0 comments on commit 617274f

Please sign in to comment.