Skip to content

Commit 4f94272

Browse files
committed
improve code style
1 parent ecf62d8 commit 4f94272

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

postgres_composite_types/forms.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,10 @@ def clean(self, value):
146146
try:
147147
cleaned_data[name] = field.clean(value.get(name))
148148
except forms.ValidationError as error:
149-
prefix = '%(label)s:' if DJANGO21 \
150-
else '%(label)s: '
149+
if DJANGO21:
150+
prefix = '%(label)s:'
151+
else:
152+
prefix = '%(label)s: '
151153
errors.append(prefix_validation_error(
152154
error, code='field_invalid',
153155
prefix=prefix, params={'label': field.label}))

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
22
skipsdist = True
33
envlist =
4-
py{35,36}-dj{1.11,2.0, 2.1}
4+
py{35,36}-dj{1.11,2.0,2.1}
55
pycodestyle,isort,pylint
66

77
[testenv]

0 commit comments

Comments
 (0)