From b043e273e6ee60abaca02d132b1dce99a7edd3e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 2 Dec 2014 12:54:55 +0100 Subject: [PATCH] Fix most flake8 errors review8771002 --- __init__.py | 4 ++-- account.py | 6 +++--- line.py | 6 +++--- setup.py | 4 ++-- tests/__init__.py | 4 ++-- tests/test_analytic_account.py | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/__init__.py b/__init__.py index b42ec04169..0d1252f3d1 100644 --- a/__init__.py +++ b/__init__.py @@ -1,5 +1,5 @@ -#This file is part of Tryton. The COPYRIGHT file at the top level of -#this repository contains the full copyright notices and license terms. +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. from trytond.pool import Pool from .account import * diff --git a/account.py b/account.py index 359e3267f3..86b3807b4e 100644 --- a/account.py +++ b/account.py @@ -1,5 +1,5 @@ -#This file is part of Tryton. The COPYRIGHT file at the top level of -#this repository contains the full copyright notices and license terms. +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. from decimal import Decimal import copy from sql import Column @@ -399,7 +399,7 @@ class AccountSelection(ModelSQL, ModelView): if Transaction().user: # Root can by pass for account in root_accounts: if account.mandatory: - if not account.id in roots: + if account.id not in roots: cls.raise_user_error('root_account', (account.rec_name,)) diff --git a/line.py b/line.py index c3458c3b8d..fd7a428a39 100644 --- a/line.py +++ b/line.py @@ -1,5 +1,5 @@ -#This file is part of Tryton. The COPYRIGHT file at the top level of -#this repository contains the full copyright notices and license terms. +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. from decimal import Decimal from trytond.model import ModelView, ModelSQL, fields from trytond.wizard import Wizard, StateAction @@ -26,7 +26,7 @@ class Line(ModelSQL, ModelView): company = fields.Function(fields.Many2One('company.company', 'Company'), 'on_change_with_company') account = fields.Many2One('analytic_account.account', 'Account', - required=True, select=True, domain=[ + required=True, select=True, domain=[ ('type', '!=', 'view'), ['OR', ('company', '=', None), diff --git a/setup.py b/setup.py index de94b06bac..48fb65756c 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -#This file is part of Tryton. The COPYRIGHT file at the top level of -#this repository contains the full copyright notices and license terms. +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. from setuptools import setup import re diff --git a/tests/__init__.py b/tests/__init__.py index 9ed41c1007..0a5d66bea7 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,5 +1,5 @@ -#This file is part of Tryton. The COPYRIGHT file at the top level of -#this repository contains the full copyright notices and license terms. +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. from .test_analytic_account import suite diff --git a/tests/test_analytic_account.py b/tests/test_analytic_account.py index e3b9bb4395..c132c488b3 100644 --- a/tests/test_analytic_account.py +++ b/tests/test_analytic_account.py @@ -1,5 +1,5 @@ -#This file is part of Tryton. The COPYRIGHT file at the top level of -#this repository contains the full copyright notices and license terms. +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. import unittest from decimal import Decimal import trytond.tests.test_tryton