Use simple Python 3 super() funtion

This commit is contained in:
Patrick Jentsch 2021-01-28 11:26:09 +01:00
parent 2b1a74efb8
commit 9cff7d76aa

View File

@ -28,7 +28,7 @@ class AddCorpusFileForm(FlaskForm):
submit = SubmitField()
def __init__(self, corpus, *args, **kwargs):
super(AddCorpusFileForm, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
self.corpus = corpus
def validate_file(self, field):
@ -84,7 +84,7 @@ class ImportCorpusForm(FlaskForm):
title = StringField('Title', validators=[DataRequired(), Length(1, 32)])
def __init__(self, *args, **kwargs):
super(ImportCorpusForm, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
def validate_file(self, field):
if not field.data.filename.lower().endswith('.zip'):