From 4dfbe5dba2bd2309c2dd165581fa9c20c93d6753 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Fri, 19 May 2017 14:16:32 +0200 Subject: [PATCH] Fix k, v names. --- accountant/views/accounts.py | 4 ++-- accountant/views/operations.py | 4 ++-- accountant/views/scheduled_operations.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/accountant/views/accounts.py b/accountant/views/accounts.py index 44eddbb..32de41c 100644 --- a/accountant/views/accounts.py +++ b/accountant/views/accounts.py @@ -213,8 +213,8 @@ class AccountResource(Resource): ns.abort(404, 'Account with id %d not found.' % account_id) # SQLAlchemy objects ignore __dict__.update() with merge. - for k, v in data.items(): - setattr(account, k, v) + for key, value in data.items(): + setattr(account, key, value) db.session.merge(account) # pylint: disable=no-member diff --git a/accountant/views/operations.py b/accountant/views/operations.py index d9c233c..cc0cc5f 100644 --- a/accountant/views/operations.py +++ b/accountant/views/operations.py @@ -194,8 +194,8 @@ class OperationResource(Resource): # FIXME check account_id consistency. # SQLAlchemy objects ignore __dict__.update() with merge. - for k, v in data.items(): - setattr(operation, k, v) + for key, value in data.items(): + setattr(operation, key, value) db.session.merge(operation) # pylint: disable=no-member diff --git a/accountant/views/scheduled_operations.py b/accountant/views/scheduled_operations.py index c393495..b73c992 100644 --- a/accountant/views/scheduled_operations.py +++ b/accountant/views/scheduled_operations.py @@ -171,8 +171,8 @@ class ScheduledOperationResource(Resource): # FIXME check account_id consistency. # SQLAlchemy objects ignore __dict__.update() with merge. - for k, v in data.items(): - setattr(scheduled_operation, k, v) + for key, value in data.items(): + setattr(scheduled_operation, key, value) db.session.merge(scheduled_operation) # pylint: disable=no-member