Skip to content

Commit e616da9

Browse files
Add the recent mypy fix to field.py to the template for this file (#2979)
1 parent 63efa48 commit e616da9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/templates/field.py.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ class {{ k.name }}({{ k.parent }}):
367367
if isinstance(data, datetime):
368368
if self._default_timezone and data.tzinfo is None:
369369
data = data.replace(tzinfo=self._default_timezone)
370-
return data
370+
return cast(datetime, data)
371371
if isinstance(data, date):
372372
return data
373373
if isinstance(data, int):

0 commit comments

Comments
 (0)