Skip to content

Commit

Permalink
Format the code with the newest black version
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Oct 1, 2020
1 parent 3b36483 commit 8753ac3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions form_designer/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ def __init__(self, *args, **kwargs):
)

self.fields["config_options"] = forms.MultipleChoiceField(
choices=choices, label=_("Options"), widget=forms.CheckboxSelectMultiple,
choices=choices,
label=_("Options"),
widget=forms.CheckboxSelectMultiple,
)

config_fieldsets = []
Expand Down Expand Up @@ -109,7 +111,8 @@ def _form_fields(self, cfg_key, cfg):
if callable(form_fields):
return form_fields(self) # TODO arguments?
warnings.warn(
"form_fields of %r should be a callable" % (cfg_key,), DeprecationWarning,
"form_fields of %r should be a callable" % (cfg_key,),
DeprecationWarning,
)
return form_fields() if callable(form_fields) else form_fields

Expand Down
2 changes: 1 addition & 1 deletion form_designer/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class Meta:
verbose_name_plural = _("form submissions")

def sorted_data(self, include=()):
""" Return OrderedDict by field ordering and using names as keys.
"""Return OrderedDict by field ordering and using names as keys.
`include` can be a tuple containing any or all of 'date', 'time',
'datetime', or 'path' to include additional meta data.
Expand Down
3 changes: 2 additions & 1 deletion tests/testapp/test_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ def test_admin(self):

def test_honeypot(self):
form = Form.objects.create(
title="Test honeypot form", config_json=('{"honeypot": {}}'),
title="Test honeypot form",
config_json=('{"honeypot": {}}'),
)
form.fields.create(ordering=0, title="Subject", name="subject", type="text")
form.fields.create(
Expand Down

0 comments on commit 8753ac3

Please sign in to comment.