From a16b8cc4b57e849cc208c49f612af56b3e966fbf Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Wed, 2 May 2018 21:13:45 -0400 Subject: [PATCH] Clean up pylint failures --- common/test/acceptance/tests/helpers.py | 2 +- .../test/acceptance/tests/video/test_studio_video_module.py | 6 +++++- pavelib/paver_tests/test_js_test.py | 3 ++- pavelib/quality.py | 3 ++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/common/test/acceptance/tests/helpers.py b/common/test/acceptance/tests/helpers.py index 5e4460eced..58393b16fb 100644 --- a/common/test/acceptance/tests/helpers.py +++ b/common/test/acceptance/tests/helpers.py @@ -746,7 +746,7 @@ class AcceptanceTest(WebAppTest): os.environ.get('BOK_CHOY_HOSTNAME', '127.0.0.1'), os.environ.get('BOK_CHOY_LMS_PORT', 8003), )) - except: + except: # pylint: disable=bare-except self.browser.get('http://{}:{}'.format( os.environ.get('BOK_CHOY_HOSTNAME', '127.0.0.1'), os.environ.get('BOK_CHOY_CMS_PORT', 8031), diff --git a/common/test/acceptance/tests/video/test_studio_video_module.py b/common/test/acceptance/tests/video/test_studio_video_module.py index f6b17f9a63..1c3098ff99 100644 --- a/common/test/acceptance/tests/video/test_studio_video_module.py +++ b/common/test/acceptance/tests/video/test_studio_video_module.py @@ -143,7 +143,11 @@ class CMSVideoBaseTest(UniqueCourseTest): xblock_index: number starting from 1 (0th entry is the unit page itself) """ self.unit_page.xblocks[xblock_index].edit() - EmptyPromise(lambda: self.video.q(css='div.basic_metadata_edit').visible, "Wait for the basic editor to be open", timeout=5).fulfill() + EmptyPromise( + lambda: self.video.q(css='div.basic_metadata_edit').visible, + "Wait for the basic editor to be open", + timeout=5 + ).fulfill() def open_advanced_tab(self): """ diff --git a/pavelib/paver_tests/test_js_test.py b/pavelib/paver_tests/test_js_test.py index f1908ae2cd..f4b769ac71 100644 --- a/pavelib/paver_tests/test_js_test.py +++ b/pavelib/paver_tests/test_js_test.py @@ -120,7 +120,8 @@ class TestPaverJavaScriptTestTasks(PaverTestCase): for suite in suites: # Karma test command karma_config_file = Env.KARMA_CONFIG_FILES[Env.JS_TEST_ID_KEYS.index(suite)] - expected_test_tool_command = u'nodejs --max_old_space_size=4096 node_modules/.bin/karma start {options}'.format( + command_template = u'nodejs --max_old_space_size=4096 node_modules/.bin/karma start {options}' + expected_test_tool_command = command_template.format( options=self.EXPECTED_KARMA_OPTIONS.format( config_file=karma_config_file, single_run='false' if dev_mode else 'true', diff --git a/pavelib/quality.py b/pavelib/quality.py index e76f71e949..f6d1619eaf 100644 --- a/pavelib/quality.py +++ b/pavelib/quality.py @@ -323,7 +323,8 @@ def run_eslint(options): violations_limit = int(getattr(options, 'limit', -1)) sh( - "nodejs --max_old_space_size=4096 node_modules/.bin/eslint --ext .js --ext .jsx --format=compact . | tee {eslint_report}".format( + "nodejs --max_old_space_size=4096 node_modules/.bin/eslint " + "--ext .js --ext .jsx --format=compact . | tee {eslint_report}".format( eslint_report=eslint_report ), ignore_error=True