Skip to content

Commit 753e0b7

Browse files
committed
Reformat with Ruff
1 parent 9b6ac86 commit 753e0b7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

drf_excel/fields.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,15 @@ def init_value(self, value):
135135
return self._parse_date(
136136
value, "DATETIME_FORMAT", parse_datetime
137137
).replace(tzinfo=None)
138-
elif isinstance(self.drf_field, DateField) and type(value) is not datetime.date:
138+
elif (
139+
isinstance(self.drf_field, DateField)
140+
and type(value) is not datetime.date
141+
):
139142
return self._parse_date(value, "DATE_FORMAT", parse_date)
140-
elif isinstance(self.drf_field, TimeField) and type(value) is not datetime.time:
143+
elif (
144+
isinstance(self.drf_field, TimeField)
145+
and type(value) is not datetime.time
146+
):
141147
return self._parse_date(value, "TIME_FORMAT", parse_time).replace(
142148
tzinfo=None
143149
)

0 commit comments

Comments
 (0)