Pylint.
This commit is contained in:
parent
6c3f73cd75
commit
01a509d348
@ -2,15 +2,14 @@
|
||||
|
||||
# vim: set tw=80 ts=4 sw=4 sts=4:
|
||||
|
||||
# pylint: disable=no-member,too-few-public-methods
|
||||
from . import db
|
||||
|
||||
from .operations import Operation
|
||||
|
||||
|
||||
# pylint: disable=no-member,invalid-name,too-few-public-methods,no-self-use
|
||||
class Account(db.Model):
|
||||
"""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)
|
||||
authorized_overdraft = db.Column(db.Integer, nullable=True, default=0)
|
||||
@ -87,7 +86,6 @@ 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."""
|
||||
del key
|
||||
|
@ -6,14 +6,13 @@ from datetime import date
|
||||
|
||||
import arrow
|
||||
|
||||
# pylint: disable=no-member,too-few-public-methods
|
||||
from . import db
|
||||
|
||||
|
||||
# pylint: disable=too-many-instance-attributes
|
||||
# pylint: disable=no-member,invalid-name,too-many-arguments
|
||||
# pylint: disable=too-few-public-methods,too-many-instance-attributes
|
||||
class Operation(db.Model):
|
||||
"""Class used to handle operations."""
|
||||
# pylint: disable=invalid-name
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
|
||||
operation_date = db.Column(
|
||||
@ -82,7 +81,6 @@ 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):
|
||||
|
@ -6,16 +6,16 @@ from calendar import monthrange
|
||||
|
||||
import arrow
|
||||
|
||||
# pylint: disable=no-member,too-few-public-methods,too-many-instance-attributes
|
||||
from . import db
|
||||
|
||||
from .accounts import Account
|
||||
from .operations import Operation
|
||||
|
||||
|
||||
# pylint: disable=no-member,invalid-name,too-many-arguments
|
||||
# pylint: disable=too-few-public-methods,too-many-instance-attributes
|
||||
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)
|
||||
@ -39,7 +39,6 @@ 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
|
||||
|
@ -7,10 +7,10 @@ from passlib.hash import sha256_crypt as crypt
|
||||
from . import db
|
||||
|
||||
|
||||
# pylint: disable=no-member,too-few-public-methods
|
||||
# pylint: disable=no-member,invalid-name
|
||||
# pylint: disable=too-few-public-methods,too-many-instance-attributes
|
||||
class User(db.Model):
|
||||
"""Class used to handle users."""
|
||||
# pylint: disable=invalid-name
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
email = db.Column(db.String(200), nullable=False, unique=True, index=True)
|
||||
password = db.Column(db.String(100), nullable=True)
|
||||
|
Loading…
Reference in New Issue
Block a user