Python linting

This commit is contained in:
Jason Kelly 2021-05-24 09:35:21 +08:00
parent 7eb5f3b026
commit b362b72c57

View file

@ -334,7 +334,7 @@ class TagField(ManyToManyField):
class ClearableFileInputWithWarning(ClearableFileInput): class ClearableFileInputWithWarning(ClearableFileInput):
template_name = 'widgets/clearable_file_input_with_warning.html' template_name = "widgets/clearable_file_input_with_warning.html"
class CustomImageField(ImageField): class CustomImageField(ImageField):
@ -405,10 +405,12 @@ class ImageField(ActivitypubFieldMixin, models.ImageField):
return [image_name, image_content] return [image_name, image_content]
def formfield(self, **kwargs): def formfield(self, **kwargs):
return super().formfield(**{ return super().formfield(
'form_class': CustomImageField, **{
**kwargs, "form_class": CustomImageField,
}) **kwargs,
}
)
class DateTimeField(ActivitypubFieldMixin, models.DateTimeField): class DateTimeField(ActivitypubFieldMixin, models.DateTimeField):