Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob Booij-Liewes committed Jan 12, 2025
1 parent e12a8a7 commit 0b8c3c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion binder/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ def update_dimension_fields(self, instance, force=False, *args, **kwargs):
if not file and not force:
return

dimension_fields_filled = not(
dimension_fields_filled = not (
(self.width_field and not getattr(instance, self.width_field)) or
(self.height_field and not getattr(instance, self.height_field))
)
Expand Down
4 changes: 2 additions & 2 deletions binder/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ def _annotate_objs(self, datas_by_id, objs_by_id):
for obj_id, data in datas_by_id.items():
# TODO: Don't require OneToOneFields in the m2m_fields list
if isinstance(local_field, models.OneToOneRel):
assert(len(idmap[obj_id]) <= 1)
assert (len(idmap[obj_id]) <= 1)
data[field_name] = idmap[obj_id][0] if len(idmap[obj_id]) == 1 else None
else:
data[field_name] = idmap[obj_id]
Expand Down Expand Up @@ -1476,7 +1476,7 @@ def store_m2m_field(obj, field, value, request):

try:
obj.save()
assert(obj.pk is not None) # At this point, the object must have been created.
assert (obj.pk is not None) # At this point, the object must have been created.
except ValidationError as ve:
validation_errors.append(self.binder_validation_error(obj, ve, pk=pk))

Expand Down

0 comments on commit 0b8c3c9

Please sign in to comment.