lint: class methods fixed
no real change in behavior, but code is cleaner
This commit is contained in:
parent
d46449577f
commit
6756432ce0
3 changed files with 3 additions and 2 deletions
|
@ -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:
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue