From b388ab9db066df4d5c3009bdc3ad34e3246f7962 Mon Sep 17 00:00:00 2001 From: stv Date: Sat, 8 Nov 2014 17:24:01 -0800 Subject: [PATCH] Fix PEP8: E226 missing whitespace around arithmetic operator --- common/lib/xmodule/xmodule/lti_module.py | 2 +- common/test/acceptance/pages/lms/annotation_component.py | 2 +- common/test/data/uploads/python_lib_zip/number_helpers.py | 2 +- lms/djangoapps/courseware/tests/test_navigation.py | 2 +- scripts/cov_merge.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/lib/xmodule/xmodule/lti_module.py b/common/lib/xmodule/xmodule/lti_module.py index 2cf31195e6..85d4fb9300 100644 --- a/common/lib/xmodule/xmodule/lti_module.py +++ b/common/lib/xmodule/xmodule/lti_module.py @@ -773,7 +773,7 @@ oauth_consumer_key="", oauth_signature="frVp4JuvT1mVXlxktiAUjQ7%2F1cw%3D"'} imsx_messageIdentifier = root.xpath("//def:imsx_messageIdentifier", namespaces=namespaces)[0].text or '' sourcedId = root.xpath("//def:sourcedId", namespaces=namespaces)[0].text score = root.xpath("//def:textString", namespaces=namespaces)[0].text - action = root.xpath("//def:imsx_POXBody", namespaces=namespaces)[0].getchildren()[0].tag.replace('{'+lti_spec_namespace+'}', '') + action = root.xpath("//def:imsx_POXBody", namespaces=namespaces)[0].getchildren()[0].tag.replace('{' + lti_spec_namespace + '}', '') # Raise exception if score is not float or not in range 0.0-1.0 regarding spec. score = float(score) if not 0 <= score <= 1: diff --git a/common/test/acceptance/pages/lms/annotation_component.py b/common/test/acceptance/pages/lms/annotation_component.py index ad8ac3fd20..a1e31fc520 100644 --- a/common/test/acceptance/pages/lms/annotation_component.py +++ b/common/test/acceptance/pages/lms/annotation_component.py @@ -41,7 +41,7 @@ class AnnotationComponentPage(PageObject): Return css selector for current active problem with sub_selector. """ return 'div[data-problem-id="{}"] {}'.format( - self.q(css='.vert-{}'.format(self.active_problem+1)).map( + self.q(css='.vert-{}'.format(self.active_problem + 1)).map( lambda el: el.get_attribute('data-id')).results[0], sub_selector, ) diff --git a/common/test/data/uploads/python_lib_zip/number_helpers.py b/common/test/data/uploads/python_lib_zip/number_helpers.py index 04db8e9bfe..8cc3c93804 100644 --- a/common/test/data/uploads/python_lib_zip/number_helpers.py +++ b/common/test/data/uploads/python_lib_zip/number_helpers.py @@ -3,4 +3,4 @@ def seventeen(): def fortytwo(x): - return 42+x + return 42 + x diff --git a/lms/djangoapps/courseware/tests/test_navigation.py b/lms/djangoapps/courseware/tests/test_navigation.py index 8d97567c5d..6b5dbe41a3 100644 --- a/lms/djangoapps/courseware/tests/test_navigation.py +++ b/lms/djangoapps/courseware/tests/test_navigation.py @@ -79,7 +79,7 @@ class TestNavigation(ModuleStoreTestCase, LoginEnrollmentTestCase): ''' Check if the progress tab is active in the tab set ''' for line in response.content.split('\n'): if tabname in line and 'active' in line: - raise AssertionError("assertTabInactive failed: "+tabname+" active") + raise AssertionError("assertTabInactive failed: " + tabname + " active") return def test_chrome_settings(self): diff --git a/scripts/cov_merge.py b/scripts/cov_merge.py index 8b4cd1c6d5..02632d14be 100644 --- a/scripts/cov_merge.py +++ b/scripts/cov_merge.py @@ -119,7 +119,7 @@ class ReportMerge(object): report_path = os.path.join(self.DESTINATION, output_file) else: report_filename = path.split('reports/')[1].split('/cover')[0].replace('/', '_') - report_path = os.path.join(self.DESTINATION, report_filename+'_coverage.html') + report_path = os.path.join(self.DESTINATION, report_filename + '_coverage.html') # Write everything to single report file with open(report_path, 'w') as report_file: