From 0b2dd7a87864dc181d60a5aeafe221238c8f5343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 17 Feb 2013 00:35:14 +0100 Subject: [PATCH] Fix flake8 --- product.py | 32 ++++++++++++++++---------------- setup.py | 8 ++++---- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/product.py b/product.py index 7fe8f13200..c31e57fc1f 100644 --- a/product.py +++ b/product.py @@ -168,19 +168,20 @@ class Template: states={ 'invisible': (~Eval('context', {}).get('company') | Eval('account_category')), - }, help='This account will be used instead of the one defined'\ - ' on the category.', depends=['account_category'])) + }, + help='This account will be used instead of the one defined' + ' on the category.', depends=['account_category'])) account_revenue = fields.Property(fields.Many2One('account.account', - 'Account Revenue', domain=[ - ('kind', '=', 'revenue'), - ('company', '=', Eval('context', {}).get('company', 0)), - ], on_change=['account_category', 'account_revenue'], - states={ - 'invisible': (~Eval('context', {}).get('company') - | Eval('account_category')), - }, - help='This account will be used instead of the one defined'\ - ' on the category.', depends=['account_category'])) + 'Account Revenue', domain=[ + ('kind', '=', 'revenue'), + ('company', '=', Eval('context', {}).get('company', 0)), + ], on_change=['account_category', 'account_revenue'], + states={ + 'invisible': (~Eval('context', {}).get('company') + | Eval('account_category')), + }, + help='This account will be used instead of the one defined' + ' on the category.', depends=['account_category'])) account_expense_used = fields.Function(fields.Many2One('account.account', 'Account Expense Used'), 'get_account') account_revenue_used = fields.Function(fields.Many2One('account.account', @@ -216,10 +217,9 @@ class Template: def __setup__(cls): super(Template, cls).__setup__() cls._error_messages.update({ - 'missing_account': 'There is no account ' \ - 'expense/revenue defined on the product ' \ - '%s (%d)', - }) + 'missing_account': ('There is no account ' + 'expense/revenue defined on the product %s (%d)'), + }) cls.category.states['required'] = Or( cls.category.states.get('required', False), Eval('account_category', False) | Eval('taxes_category', False)) diff --git a/setup.py b/setup.py index 5558da640f..3657ba1d6a 100644 --- a/setup.py +++ b/setup.py @@ -36,16 +36,16 @@ setup(name='trytond_account_product', long_description=read('README'), author='Tryton', url='http://www.tryton.org/', - download_url="http://downloads.tryton.org/" + \ - info.get('version', '0.0.1').rsplit('.', 1)[0] + '/', + download_url=("http://downloads.tryton.org/" + + info.get('version', '0.0.1').rsplit('.', 1)[0] + '/'), package_dir={'trytond.modules.account_product': '.'}, packages=[ 'trytond.modules.account_product', 'trytond.modules.account_product.tests', ], package_data={ - 'trytond.modules.account_product': info.get('xml', []) \ - + ['tryton.cfg', 'locale/*.po'], + 'trytond.modules.account_product': (info.get('xml', []) + + ['tryton.cfg', 'locale/*.po']), }, classifiers=[ 'Development Status :: 5 - Production/Stable',