Fix flake8 errors and warnings
We add the flake8 configuration used so we ensure everyone uses the same. We remove the usage of __all__ for non public API. When possible, we rationalize the class name according to its __name__ and module. issue9082 review297061002
This commit is contained in:
1 parent
2465778685
commit
903b2f43bc
4 files changed
+16
-11
No files matched your search
+7
-7
@@ -2,17 +2,17 @@
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
from trytond.pool import Pool
|
||||
from .forecast import *
|
||||
from . import forecast
|
||||
|
||||
|
||||
def register():
|
||||
Pool.register(
|
||||
Forecast,
|
||||
ForecastLine,
|
||||
ForecastLineMove,
|
||||
ForecastCompleteAsk,
|
||||
ForecastCompleteChoose,
|
||||
forecast.Forecast,
|
||||
forecast.ForecastLine,
|
||||
forecast.ForecastLineMove,
|
||||
forecast.ForecastCompleteAsk,
|
||||
forecast.ForecastCompleteChoose,
|
||||
module='stock_forecast', type_='model')
|
||||
Pool.register(
|
||||
ForecastComplete,
|
||||
forecast.ForecastComplete,
|
||||
module='stock_forecast', type_='wizard')
|
||||
+3
-1
@@ -381,7 +381,9 @@ class ForecastLine(ModelSQL, ModelView):
|
||||
line_move = LineMove.__table__()
|
||||
|
||||
result = dict((x.id, 0) for x in lines)
|
||||
key = lambda line: line.forecast.id
|
||||
|
||||
def key(line):
|
||||
return line.forecast.id
|
||||
lines.sort(key=key)
|
||||
for forecast_id, lines in itertools.groupby(lines, key):
|
||||
forecast = Forecast(forecast_id)
|
||||
|
||||
@@ -78,8 +78,8 @@ setup(name=name,
|
||||
keywords='tryton stock forecast',
|
||||
package_dir={'trytond.modules.stock_forecast': '.'},
|
||||
packages=(
|
||||
['trytond.modules.stock_forecast'] +
|
||||
['trytond.modules.stock_forecast.%s' % p for p in find_packages()]
|
||||
['trytond.modules.stock_forecast']
|
||||
+ ['trytond.modules.stock_forecast.%s' % p for p in find_packages()]
|
||||
),
|
||||
package_data={
|
||||
'trytond.modules.stock_forecast': (info.get('xml', [])
|
||||
@@ -93,7 +93,8 @@ setup(name=name,
|
||||
'Intended Audience :: Financial and Insurance Industry',
|
||||
'Intended Audience :: Legal Industry',
|
||||
'Intended Audience :: Manufacturing',
|
||||
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
|
||||
'License :: OSI Approved :: '
|
||||
'GNU General Public License v3 or later (GPLv3+)',
|
||||
'Natural Language :: Bulgarian',
|
||||
'Natural Language :: Catalan',
|
||||
'Natural Language :: Chinese (Simplified)',
|
||||
|
||||
Reference in new issue
Block a user