From f328e4656aa51c2fe1d44ecd2a9f2ddec8dd8a92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 24 Feb 2013 15:35:20 +0100 Subject: [PATCH] Fix flake8 --- setup.py | 14 +++++++------- work.py | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/setup.py b/setup.py index 0b8e26aa98..49dd593465 100644 --- a/setup.py +++ b/setup.py @@ -25,10 +25,10 @@ requires = [] for dep in info.get('depends', []): if not re.match(r'(ir|res|webdav)(\W|$)', dep): requires.append('trytond_%s >= %s.%s, < %s.%s' % - (dep, major_version, minor_version, major_version, - minor_version + 1)) + (dep, major_version, minor_version, major_version, + minor_version + 1)) requires.append('trytond >= %s.%s, < %s.%s' % - (major_version, minor_version, major_version, minor_version + 1)) + (major_version, minor_version, major_version, minor_version + 1)) setup(name='trytond_project_plan', version=info.get('version', '0.0.1'), @@ -36,16 +36,16 @@ setup(name='trytond_project_plan', 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.project_plan': '.'}, packages=[ 'trytond.modules.project_plan', 'trytond.modules.project_plan.tests', ], package_data={ - 'trytond.modules.project_plan': info.get('xml', []) \ - + ['tryton.cfg', 'locale/*.po'], + 'trytond.modules.project_plan': (info.get('xml', []) + + ['tryton.cfg', 'locale/*.po']), }, classifiers=[ 'Development Status :: 5 - Production/Stable', diff --git a/work.py b/work.py index 5baf665baa..cdeb3f2969 100644 --- a/work.py +++ b/work.py @@ -246,10 +246,10 @@ class Work: for fun_field, db_field in zip(fun_fields, db_fields): if fun_field == name: cls.write(works, { - db_field: value \ - and datetime.datetime.combine(value, - datetime.time()) \ - or None, + db_field: (value + and datetime.datetime.combine(value, + datetime.time()) + or None), }) break @@ -348,7 +348,7 @@ class Work: mindate = lambda x, y: x and y and min(x, y) or x or y # propagate constraint_start_time - constraint_start = reduce(maxdate, (pred.early_finish_time \ + constraint_start = reduce(maxdate, (pred.early_finish_time for pred in self.predecessors), None) if constraint_start is None and self.parent: @@ -429,7 +429,7 @@ class Work: parent = work # propagate constraint_finish_time - constraint_finish = reduce(mindate, (succ.late_start_time \ + constraint_finish = reduce(mindate, (succ.late_start_time for succ in self.successors), None) if constraint_finish is None and self.parent: