lint: class methods fixed

no real change in behavior, but code is cleaner
This commit is contained in:
boyska 2017-01-19 11:04:57 +01:00
parent d46449577f
commit 6756432ce0
No known key found for this signature in database
GPG key ID: 7395DCAE58289CA9
3 changed files with 3 additions and 2 deletions

View file

@ -17,7 +17,7 @@ class AudioForm(Form):
'(like 9w3d12h)')
submit = SubmitField('Submit')
def validate_maxage(form, field):
def validate_maxage(self, field):
try:
int(field.data)
except ValueError:

View file

@ -25,7 +25,7 @@ class ScriptAudioForm(Form):
else:
self.args.data = ';'.join(audiospec['args'])
def validate_name(form, field):
def validate_name(self, field):
if '/' in field.data:
raise ValidationError("Name cannot have slashes: "
"it's a name, not a path")

View file

@ -45,6 +45,7 @@ class SingleAlarm(Alarm):
description = 'Only once, at a specified date and time'
def __init__(self, obj):
super().__init__()
self.dt = getdate(obj['timestamp'])
def next_ring(self, current_time=None):