Skip to content

Commit

Permalink
Make it build
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Jun 3, 2024
1 parent 66544d9 commit b2f9e80
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 22 deletions.
23 changes: 9 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.15.0
rev: 1.16.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.1.13"
rev: "v0.3.2"
hooks:
- id: ruff
- id: ruff-format
Expand All @@ -33,21 +33,16 @@ repos:
- id: prettier
args: [--list-different, --no-semi]
exclude: "^conf/|.*\\.html$"
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.54.0
hooks:
- id: eslint
additional_dependencies:
- eslint
- eslint-config-prettier
- "@babel/core"
- "@babel/eslint-parser"
- "@babel/preset-env"
- repo: https://github.com/biomejs/pre-commit
rev: "v0.1.0"
hooks:
- id: biome-check
additional_dependencies: ["@biomejs/[email protected]"]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.6.0
rev: 1.7.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.15
rev: v0.16
hooks:
- id: validate-pyproject
17 changes: 17 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

sphinx:
configuration: docs/conf.py
# python:
# install:
# - requirements: docs/requirements.txt
# - method: pip
# path: .
4 changes: 1 addition & 3 deletions form_designer/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,7 @@ def old_name_loader(submission, old_name):
if isinstance(field_type, dict):
continue
warnings.warn(
"Form designer field type {!r} still uses the old configuration format.".format(
field_type
),
f"Form designer field type {field_type!r} still uses the old configuration format.",
DeprecationWarning,
stacklevel=1,
)
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ path = "form_designer/__init__.py"
include = ["/form_designer"]

[tool.ruff]
extend-select = [
lint.extend-select = [
# pyflakes, pycodestyle
"F", "E", "W",
# mmcabe
Expand Down Expand Up @@ -89,7 +89,7 @@ extend-select = [
# unused noqa
"RUF100",
]
extend-ignore = [
lint.extend-ignore = [
# Allow zip() without strict=
"B905",
# No line length errors
Expand All @@ -99,14 +99,14 @@ fix = true
show-fixes = true
target-version = "py39"

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

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

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"*/migrat*/*" = [
# Allow using PascalCase model names in migrations
"N806",
Expand Down

0 comments on commit b2f9e80

Please sign in to comment.