Fix most flake8 errors

review8771002
This commit is contained in:
Cédric Krier
2014-12-02 12:55:52 +01:00
parent 4ed93d01c9
commit 22f5fcba0b
9 changed files with 27 additions and 27 deletions
+2 -2
View File
@@ -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 .sale import *
+2 -2
View File
@@ -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.model import ModelView, ModelSQL, ModelSingleton, fields
from trytond.pyson import Eval, Bool
+2 -2
View File
@@ -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 functools import wraps
from sql import Table
+2 -2
View File
@@ -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 datetime
from trytond.model import fields
+5 -5
View File
@@ -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 itertools import groupby, chain
from functools import partial
@@ -92,8 +92,8 @@ class Sale(Workflow, ModelSQL, ModelView):
depends=['state'])
currency = fields.Many2One('currency.currency', 'Currency', required=True,
states={
'readonly': (Eval('state') != 'draft') |
(Eval('lines', [0]) & Eval('currency', 0)),
'readonly': ((Eval('state') != 'draft')
| (Eval('lines', [0]) & Eval('currency', 0))),
},
depends=['state'])
currency_digits = fields.Function(fields.Integer('Currency Digits'),
@@ -1592,7 +1592,7 @@ class HandleInvoiceExceptionAsk(ModelView):
domain=[('id', 'in', Eval('domain_invoices'))],
depends=['domain_invoices'],
help='The selected invoices will be recreated. '
'The other ones will be ignored.')
'The other ones will be ignored.')
domain_invoices = fields.Many2Many(
'account.invoice', None, None, 'Domain Invoices')
+2 -2
View File
@@ -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
+8 -8
View File
@@ -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 sql import Null
from sql.operators import Concat
@@ -19,9 +19,9 @@ class ShipmentOut:
def __setup__(cls):
super(ShipmentOut, cls).__setup__()
cls._error_messages.update({
'reset_move': 'You cannot reset to draft a move generated '
'by a sale.',
})
'reset_move': ('You cannot reset to draft a move generated '
'by a sale.'),
})
@classmethod
def write(cls, *args):
@@ -69,9 +69,9 @@ class ShipmentOutReturn:
def __setup__(cls):
super(ShipmentOutReturn, cls).__setup__()
cls._error_messages.update({
'reset_move': 'You cannot reset to draft a move generated '
'by a sale.',
})
'reset_move': ('You cannot reset to draft a move generated '
'by a sale.'),
})
@classmethod
def write(cls, *args):
+2 -2
View File
@@ -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_sale import suite
+2 -2
View File
@@ -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
import doctest
import trytond.tests.test_tryton