From 16684a4938d082e4a68d1c4be6a6e71c69dc501b Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Sun, 7 May 2017 22:35:00 +0200 Subject: [PATCH] Fix quoting in docstring, linting. --- accountant/models/accounts.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/accountant/models/accounts.py b/accountant/models/accounts.py index 566bfbf..027eab0 100644 --- a/accountant/models/accounts.py +++ b/accountant/models/accounts.py @@ -21,7 +21,7 @@ from .operations import Operation class Account(db.Model): - "Model class to handle accounts." + """Model class to handle accounts.""" # pylint: disable=invalid-name id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(200), nullable=False) @@ -33,7 +33,7 @@ class Account(db.Model): @classmethod def query(cls, begin=None, end=None): - "Return a query for this class method." + """Return a query for this class method.""" return db.session.query( cls ).order_by( @@ -41,7 +41,7 @@ class Account(db.Model): ) def solds(self): - "Return the solds of this account." + """Return the solds of this account.""" # TODO Alexis Lahouze 2017-05-04 Rename to "balances" return db.session.query( db.func.sum(Operation.value).label("future"), @@ -64,7 +64,7 @@ class Account(db.Model): ).one() def balance(self, begin, end): - "Return the balance for a specific time period." + """Return the balance for a specific time period.""" # TODO Alexis Lahouze 2017-05-04 Rename to "flow" or "cash flow" query = db.session.query( db.func.sum( @@ -93,8 +93,9 @@ class Account(db.Model): return query.one() @db.validates('authorized_overdraft') + # pylint: disable=no-self-use def validate_authorized_overdraft(self, key, authorized_overdraft): - "Validator for authorized_overdraft : must be negative." + """Validator for authorized_overdraft : must be negative.""" assert authorized_overdraft <= 0 return authorized_overdraft