diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 788a720..ddc97fb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -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"] @@ -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 @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 740ea2a..1b0de2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 = "mk@feinheit.ch" }, + { name = "Matthias Kestenholz", email = "mk@feinheit.ch" }, ] requires-python = ">=3.9" classifiers = [ @@ -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