Skip to content
Snippets Groups Projects
Commit 9cff7d76 authored by Patrick Jentsch's avatar Patrick Jentsch
Browse files

Use simple Python 3 super() funtion

parent 2b1a74ef
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,7 @@ class AddCorpusFileForm(FlaskForm): ...@@ -28,7 +28,7 @@ class AddCorpusFileForm(FlaskForm):
submit = SubmitField() submit = SubmitField()
def __init__(self, corpus, *args, **kwargs): def __init__(self, corpus, *args, **kwargs):
super(AddCorpusFileForm, self).__init__(*args, **kwargs) super().__init__(*args, **kwargs)
self.corpus = corpus self.corpus = corpus
def validate_file(self, field): def validate_file(self, field):
...@@ -84,7 +84,7 @@ class ImportCorpusForm(FlaskForm): ...@@ -84,7 +84,7 @@ class ImportCorpusForm(FlaskForm):
title = StringField('Title', validators=[DataRequired(), Length(1, 32)]) title = StringField('Title', validators=[DataRequired(), Length(1, 32)])
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super(ImportCorpusForm, self).__init__(*args, **kwargs) super().__init__(*args, **kwargs)
def validate_file(self, field): def validate_file(self, field):
if not field.data.filename.lower().endswith('.zip'): if not field.data.filename.lower().endswith('.zip'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment