Docstring, pylint.

This commit is contained in:
Alexis Lahouze
2017-05-04 14:44:22 +02:00
parent f77843b2bb
commit 36af37d611
4 changed files with 23 additions and 0 deletions

View File

@ -26,6 +26,8 @@ from .operations import Operation
class ScheduledOperation(db.Model):
"Class used to handle scheduled operations."
# pylint: disable=invalid-name
id = db.Column(db.Integer, primary_key=True)
start_date = db.Column(db.Date, nullable=False)
@ -49,6 +51,7 @@ class ScheduledOperation(db.Model):
backref=db.backref('scheduled_operation', lazy="dynamic")
)
# pylint: disable=too-many-arguments
def __init__(self, start_date, stop_date, day, frequency, label, value,
account_id, category=None):
self.start_date = start_date
@ -62,6 +65,7 @@ class ScheduledOperation(db.Model):
@classmethod
def query(cls):
"Return base query for this class."
return db.session.query(
cls
).order_by(
@ -71,6 +75,7 @@ class ScheduledOperation(db.Model):
)
def reschedule(self):
"Reschedule a scheduled operation."
# 1) delete unconfirmed operations for this account.
db.session.query(
Operation