From 6756432ce08973577a05bd482597ea94b96a47cc Mon Sep 17 00:00:00 2001 From: boyska Date: Thu, 19 Jan 2017 11:04:57 +0100 Subject: [PATCH] lint: class methods fixed no real change in behavior, but code is cleaner --- larigira/audioform_mostrecent.py | 2 +- larigira/audioform_script.py | 2 +- larigira/timegen_every.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/larigira/audioform_mostrecent.py b/larigira/audioform_mostrecent.py index fe1717e..d8c6530 100644 --- a/larigira/audioform_mostrecent.py +++ b/larigira/audioform_mostrecent.py @@ -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: diff --git a/larigira/audioform_script.py b/larigira/audioform_script.py index fa06101..1e9caf5 100644 --- a/larigira/audioform_script.py +++ b/larigira/audioform_script.py @@ -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") diff --git a/larigira/timegen_every.py b/larigira/timegen_every.py index 8c3165b..7ea9a83 100644 --- a/larigira/timegen_every.py +++ b/larigira/timegen_every.py @@ -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):