Skip to content

Commit

Permalink
Make pre-commit happy
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Oct 21, 2024
1 parent 2734e6d commit b684ef9
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 2 deletions.
57 changes: 57 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"organizeImports": {
"enabled": false
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"a11y": {
"noSvgWithoutTitle": "off"
},
"correctness": {
"noUndeclaredVariables": "error",
"noUnusedImports": "error",
"noUnusedVariables": "error",
"useArrayLiterals": "error",
"useHookAtTopLevel": "error"
},
"security": {
"noDangerouslySetInnerHtml": "warn"
},
"style": {
"noParameterAssign": "off",
"useForOf": "warn"
},
"suspicious": {
"noArrayIndexKey": "warn",
"noAssignInExpressions": "off"
}
}
},
"javascript": {
"formatter": {
"semicolons": "asNeeded"
},
"globals": ["django", "CKEDITOR"]
},
"css": {
"formatter": {
"enabled": true
},
"linter": {
"enabled": true
}
},
"json": {
"formatter": {
"enabled": false
}
}
}
2 changes: 1 addition & 1 deletion form_designer/default_field_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ def require_choices(field):
{
"type": "simple captcha",
"verbose_name": _("Simple CAPTCHA"),
"field": CaptchaField
"field": CaptchaField,
}
)
2 changes: 1 addition & 1 deletion form_designer/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def validate_comma_separated_emails(value):


def email_field_choices(
form: Optional[forms.ModelForm], required: bool = True
form: Optional[forms.ModelForm], *, required: bool = True
) -> list[tuple[str, str]]:
if not form or not form.instance or not form.instance.pk:
return []
Expand Down

0 comments on commit b684ef9

Please sign in to comment.