Fix most flake8 errors
review8771002
This commit is contained in:
+2
-2
@@ -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 .fiscalyear import *
|
||||
|
||||
+2
-2
@@ -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 datetime
|
||||
import operator
|
||||
|
||||
+2
-2
@@ -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.pool import Pool
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
+4
-4
@@ -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 dateutil.relativedelta import relativedelta
|
||||
from trytond.model import ModelView, ModelSQL, fields
|
||||
from trytond.wizard import Wizard, StateView, StateTransition, StateAction, \
|
||||
@@ -270,8 +270,8 @@ class FiscalYear(ModelSQL, ModelView):
|
||||
]):
|
||||
cls.raise_user_error('close_error', (fiscalyear.rec_name,))
|
||||
|
||||
#First close the fiscalyear to be sure
|
||||
#it will not have new period created between.
|
||||
# First close the fiscalyear to be sure
|
||||
# it will not have new period created between.
|
||||
cls.write([fiscalyear], {
|
||||
'state': 'close',
|
||||
})
|
||||
|
||||
+2
-2
@@ -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 trytond.model import ModelView, ModelSQL, fields
|
||||
|
||||
@@ -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 datetime
|
||||
from itertools import groupby, combinations
|
||||
@@ -570,8 +570,8 @@ class Line(ModelSQL, ModelView):
|
||||
'get_move_field', setter='set_move_field',
|
||||
searcher='search_move_field')
|
||||
amount_second_currency = fields.Numeric('Amount Second Currency',
|
||||
digits=(16, Eval('second_currency_digits', 2)),
|
||||
help='The amount expressed in a second currency',
|
||||
digits=(16, Eval('second_currency_digits', 2)),
|
||||
help='The amount expressed in a second currency',
|
||||
states={
|
||||
'required': Bool(Eval('second_currency')),
|
||||
},
|
||||
@@ -588,7 +588,7 @@ class Line(ModelSQL, ModelView):
|
||||
'invisible': ~Eval('party_required', False),
|
||||
},
|
||||
depends=['party_required'])
|
||||
party_required= fields.Function(fields.Boolean('Party Required'),
|
||||
party_required = fields.Function(fields.Boolean('Party Required'),
|
||||
'on_change_with_party_required')
|
||||
maturity_date = fields.Date('Maturity Date',
|
||||
help='This field is used for payable and receivable lines. \n'
|
||||
@@ -720,7 +720,7 @@ class Line(ModelSQL, ModelView):
|
||||
with_rec_name=with_rec_name)
|
||||
|
||||
if 'move' not in fields:
|
||||
#Not manual entry
|
||||
# Not manual entry
|
||||
if 'date' in values:
|
||||
values = values.copy()
|
||||
del values['date']
|
||||
@@ -949,7 +949,7 @@ class Line(ModelSQL, ModelView):
|
||||
TaxLine = pool.get('account.tax.line')
|
||||
|
||||
if self.move:
|
||||
#Only for first line
|
||||
# Only for first line
|
||||
return
|
||||
tax_lines = []
|
||||
if self.account:
|
||||
|
||||
@@ -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 sql import Literal, Null
|
||||
|
||||
@@ -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, fields
|
||||
from trytond.wizard import Wizard, StateTransition
|
||||
from trytond.pyson import Eval
|
||||
@@ -295,10 +295,10 @@ class Period(ModelSQL, ModelView):
|
||||
unposted_move, = unposted_moves
|
||||
cls.raise_user_error('close_period_non_posted_move', {
|
||||
'period': unposted_move.period.rec_name,
|
||||
'move': unposted_move.rec_name,
|
||||
'move': unposted_move.rec_name,
|
||||
})
|
||||
#First close the period to be sure
|
||||
#it will not have new journal.period created between.
|
||||
# First close the period to be sure
|
||||
# it will not have new journal.period created between.
|
||||
cls.write(periods, {
|
||||
'state': 'close',
|
||||
})
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 decimal import Decimal
|
||||
|
||||
@@ -407,7 +407,7 @@ class TaxTemplate(ModelSQL, ModelView):
|
||||
# Migration from 1.0 group is no more required
|
||||
table.not_null_action('group', action='remove')
|
||||
|
||||
#Migration from 2.4: drop required on sequence
|
||||
# Migration from 2.4: drop required on sequence
|
||||
table.not_null_action('sequence', action='remove')
|
||||
|
||||
# Migration from 2.8: rename percentage into rate
|
||||
|
||||
+2
-2
@@ -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_account import suite
|
||||
|
||||
|
||||
@@ -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 datetime
|
||||
|
||||
+2
-2
@@ -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 dateutil.relativedelta import relativedelta
|
||||
|
||||
Reference in New Issue
Block a user