From 0d6137728079a58e94c8d3bda212e13adecc67a5 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Sun, 7 May 2017 22:23:36 +0200 Subject: [PATCH] Docstring, pylint. --- accountant/models/operations.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/accountant/models/operations.py b/accountant/models/operations.py index 4c4126b..07326fc 100644 --- a/accountant/models/operations.py +++ b/accountant/models/operations.py @@ -24,7 +24,7 @@ from . import db # pylint: disable=too-many-instance-attributes class Operation(db.Model): - "Class used to handle operations." + """Class used to handle operations.""" # pylint: disable=invalid-name id = db.Column(db.Integer, primary_key=True) @@ -94,6 +94,7 @@ class Operation(db.Model): ).label("sold") ) + # pylint: disable=too-many-arguments def __init__(self, label, value, account_id, operation_date=None, category=None, pointed=False, confirmed=True, canceled=False, scheduled_operation_id=None): @@ -109,6 +110,7 @@ class Operation(db.Model): @classmethod def query(cls, begin=None, end=None): + """Return query for this class.""" # We have to use a join because the sold is not computed from the # begining. base_query = db.session.query( @@ -146,6 +148,7 @@ class Operation(db.Model): @classmethod def get_categories_for_range(cls, account, begin, end): + """Get category list for a specific time period.""" if isinstance(account, int) or isinstance(account, str): account_id = account else: @@ -178,6 +181,7 @@ class Operation(db.Model): @classmethod def get_ohlc_per_day_for_range(cls, account, begin=None, end=None): + """Get Opening, High, Low, Closing per day for a specific range""" if isinstance(account, int) or isinstance(account, str): account_id = account else: