Use ruff in pre-commit (#1441)

* Use ruff in pre-commit

* Add pyupgrade

* Add isort

* Add bugbear

* Fix B015 Pointless comparison

* Fix B026

* B018 false positive

* Remove flake8 and isort config from setup.cfg

* Remove black and flake8 from dev dependencies

* Update black

* Show list of fixes applied with autofix on

* Fix typo

* Add C4 flake8-comprehensions

* Add ruff to dev dependencies

* Fix up
This commit is contained in:
Kien Dang 2023-08-06 06:47:00 +08:00 committed by Laurent Riviere
parent 7dc6a541a4
commit b846c371e7

View File

@ -27,8 +27,8 @@ def get_form_field_description(field):
@singledispatch @singledispatch
def convert_form_field(field): def convert_form_field(field):
raise ImproperlyConfigured( raise ImproperlyConfigured(
f"Don't know how to convert the Django form field {field} ({field.__class__}) " "Don't know how to convert the Django form field %s (%s) "
"to Graphene type" "to Graphene type" % (field, field.__class__)
) )