mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Use simple Python 3 super() funtion
This commit is contained in:
parent
2b1a74efb8
commit
9cff7d76aa
@ -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'):
|
||||
|
Loading…
Reference in New Issue
Block a user