From c5a7911b875e307b7e967c45a185d59386a537e3 Mon Sep 17 00:00:00 2001 From: Jay Zoldak Date: Thu, 20 Mar 2014 10:18:40 -0400 Subject: [PATCH] Fix pylint disable pragmas that were pep8 violations --- .../contentstore/features/advanced_settings.py | 4 ++-- cms/djangoapps/contentstore/features/checklists.py | 4 ++-- cms/djangoapps/contentstore/features/component.py | 6 +++--- .../features/component_settings_editor_helpers.py | 2 +- .../contentstore/features/course-export.py | 2 +- .../contentstore/features/course-settings.py | 4 ++-- .../contentstore/features/course-team.py | 4 ++-- .../contentstore/features/course-updates.py | 4 ++-- cms/djangoapps/contentstore/features/courses.py | 4 ++-- .../contentstore/features/discussion-editor.py | 2 +- cms/djangoapps/contentstore/features/grading.py | 4 ++-- .../contentstore/features/html-editor.py | 2 +- .../contentstore/features/problem-editor.py | 2 +- cms/djangoapps/contentstore/features/signup.py | 4 ++-- .../contentstore/features/static-pages.py | 4 ++-- cms/djangoapps/contentstore/features/subsection.py | 4 ++-- cms/djangoapps/contentstore/features/textbooks.py | 4 ++-- cms/djangoapps/contentstore/features/upload.py | 4 ++-- cms/djangoapps/contentstore/features/video.py | 2 +- .../contentstore/tests/test_contentstore.py | 2 +- cms/djangoapps/contentstore/tests/test_import.py | 2 +- cms/djangoapps/contentstore/utils.py | 2 +- cms/djangoapps/contentstore/views/error.py | 2 +- .../contentstore/views/tests/test_assets.py | 6 +++--- cms/envs/bok_choy.py | 6 +++--- cms/envs/debug_upload.py | 2 +- cms/urls.py | 2 +- common/djangoapps/contentserver/tests/test.py | 14 +++++++------- common/djangoapps/terrain/browser.py | 4 ++-- common/djangoapps/terrain/steps.py | 10 +++++----- common/djangoapps/terrain/ui_helpers.py | 4 ++-- common/lib/extract_tar.py | 2 +- .../lib/xmodule/xmodule/tests/test_capa_module.py | 8 ++++---- common/lib/xmodule/xmodule/tests/test_video.py | 2 +- .../lib/xmodule/xmodule/tests/test_xml_module.py | 2 +- common/test/acceptance/tests/helpers.py | 2 +- docs/en_us/developers/source/conf.py | 8 ++++---- lms/djangoapps/courseware/features/certificates.py | 6 +++--- lms/djangoapps/courseware/features/courseware.py | 4 ++-- .../courseware/features/courseware_common.py | 4 ++-- lms/djangoapps/courseware/features/events.py | 2 +- lms/djangoapps/courseware/features/help.py | 4 ++-- lms/djangoapps/courseware/features/homepage.py | 4 ++-- lms/djangoapps/courseware/features/login.py | 4 ++-- lms/djangoapps/courseware/features/lti.py | 2 +- lms/djangoapps/courseware/features/navigation.py | 4 ++-- lms/djangoapps/courseware/features/openended.py | 4 ++-- .../courseware/features/problems_setup.py | 4 ++-- lms/djangoapps/courseware/features/signup.py | 4 ++-- lms/djangoapps/courseware/features/video.py | 2 +- lms/djangoapps/courseware/features/word_cloud.py | 2 +- .../django_comment_client/tests/test_utils.py | 4 ++-- lms/djangoapps/instructor/features/bulk_email.py | 4 ++-- lms/djangoapps/instructor/tests/test_tools.py | 4 ++-- lms/envs/bok_choy.py | 2 +- 55 files changed, 105 insertions(+), 105 deletions(-) diff --git a/cms/djangoapps/contentstore/features/advanced_settings.py b/cms/djangoapps/contentstore/features/advanced_settings.py index 1d35a9dc11..6ff4263154 100644 --- a/cms/djangoapps/contentstore/features/advanced_settings.py +++ b/cms/djangoapps/contentstore/features/advanced_settings.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world, step from nose.tools import assert_false, assert_equal, assert_regexp_matches # pylint: disable=E0611 diff --git a/cms/djangoapps/contentstore/features/checklists.py b/cms/djangoapps/contentstore/features/checklists.py index 8a8aad0a12..0c04f5ea04 100644 --- a/cms/djangoapps/contentstore/features/checklists.py +++ b/cms/djangoapps/contentstore/features/checklists.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world, step from nose.tools import assert_true, assert_equal # pylint: disable=E0611 diff --git a/cms/djangoapps/contentstore/features/component.py b/cms/djangoapps/contentstore/features/component.py index a00c43dadb..0e8b7f9b5c 100644 --- a/cms/djangoapps/contentstore/features/component.py +++ b/cms/djangoapps/contentstore/features/component.py @@ -1,9 +1,9 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 # Lettuce formats proposed definitions for unimplemented steps with the # argument name "step" instead of "_step" and pylint does not like that. -#pylint: disable=W0613 +# pylint: disable=W0613 from lettuce import world, step from nose.tools import assert_true, assert_in # pylint: disable=E0611 diff --git a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py index 3718bfc678..f18a07b57a 100644 --- a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py +++ b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py @@ -1,5 +1,5 @@ # disable missing docstring -#pylint: disable=C0111 +# pylint: disable=C0111 from lettuce import world from nose.tools import assert_equal, assert_in # pylint: disable=E0611 diff --git a/cms/djangoapps/contentstore/features/course-export.py b/cms/djangoapps/contentstore/features/course-export.py index b0b9845088..e9d2a78c82 100644 --- a/cms/djangoapps/contentstore/features/course-export.py +++ b/cms/djangoapps/contentstore/features/course-export.py @@ -1,5 +1,5 @@ # disable missing docstring -#pylint: disable=C0111 +# pylint: disable=C0111 from lettuce import world, step from component_settings_editor_helpers import enter_xml_in_advanced_problem diff --git a/cms/djangoapps/contentstore/features/course-settings.py b/cms/djangoapps/contentstore/features/course-settings.py index 5864539ddd..e74237319c 100644 --- a/cms/djangoapps/contentstore/features/course-settings.py +++ b/cms/djangoapps/contentstore/features/course-settings.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world, step from terrain.steps import reload_the_page diff --git a/cms/djangoapps/contentstore/features/course-team.py b/cms/djangoapps/contentstore/features/course-team.py index 33770edcbe..d080de275a 100644 --- a/cms/djangoapps/contentstore/features/course-team.py +++ b/cms/djangoapps/contentstore/features/course-team.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world, step from nose.tools import assert_in # pylint: disable=E0611 diff --git a/cms/djangoapps/contentstore/features/course-updates.py b/cms/djangoapps/contentstore/features/course-updates.py index 16ca128d01..4793948b19 100644 --- a/cms/djangoapps/contentstore/features/course-updates.py +++ b/cms/djangoapps/contentstore/features/course-updates.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world, step from selenium.webdriver.common.keys import Keys diff --git a/cms/djangoapps/contentstore/features/courses.py b/cms/djangoapps/contentstore/features/courses.py index 25fd0190b4..a0502fe92a 100644 --- a/cms/djangoapps/contentstore/features/courses.py +++ b/cms/djangoapps/contentstore/features/courses.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world, step from common import * diff --git a/cms/djangoapps/contentstore/features/discussion-editor.py b/cms/djangoapps/contentstore/features/discussion-editor.py index 0bae84459f..58dbc6b8dd 100644 --- a/cms/djangoapps/contentstore/features/discussion-editor.py +++ b/cms/djangoapps/contentstore/features/discussion-editor.py @@ -1,5 +1,5 @@ # disable missing docstring -#pylint: disable=C0111 +# pylint: disable=C0111 from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/grading.py b/cms/djangoapps/contentstore/features/grading.py index 15897a06bb..5aa659d12f 100644 --- a/cms/djangoapps/contentstore/features/grading.py +++ b/cms/djangoapps/contentstore/features/grading.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world, step from common import * diff --git a/cms/djangoapps/contentstore/features/html-editor.py b/cms/djangoapps/contentstore/features/html-editor.py index d5b1502e4c..89e4100367 100644 --- a/cms/djangoapps/contentstore/features/html-editor.py +++ b/cms/djangoapps/contentstore/features/html-editor.py @@ -1,5 +1,5 @@ # disable missing docstring -#pylint: disable=C0111 +# pylint: disable=C0111 from lettuce import world, step from nose.tools import assert_in # pylint: disable=no-name-in-module diff --git a/cms/djangoapps/contentstore/features/problem-editor.py b/cms/djangoapps/contentstore/features/problem-editor.py index 7be704e20b..1c480b2d47 100644 --- a/cms/djangoapps/contentstore/features/problem-editor.py +++ b/cms/djangoapps/contentstore/features/problem-editor.py @@ -1,5 +1,5 @@ # disable missing docstring -#pylint: disable=C0111 +# pylint: disable=C0111 import json from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/signup.py b/cms/djangoapps/contentstore/features/signup.py index ee8950bac2..1aa8d4b298 100644 --- a/cms/djangoapps/contentstore/features/signup.py +++ b/cms/djangoapps/contentstore/features/signup.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world, step diff --git a/cms/djangoapps/contentstore/features/static-pages.py b/cms/djangoapps/contentstore/features/static-pages.py index a04dd3af89..091df51367 100644 --- a/cms/djangoapps/contentstore/features/static-pages.py +++ b/cms/djangoapps/contentstore/features/static-pages.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world, step from nose.tools import assert_equal # pylint: disable=E0611 diff --git a/cms/djangoapps/contentstore/features/subsection.py b/cms/djangoapps/contentstore/features/subsection.py index 68e65ee7ac..463adddd53 100644 --- a/cms/djangoapps/contentstore/features/subsection.py +++ b/cms/djangoapps/contentstore/features/subsection.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world, step from common import * diff --git a/cms/djangoapps/contentstore/features/textbooks.py b/cms/djangoapps/contentstore/features/textbooks.py index ae282a033c..4acbb68691 100644 --- a/cms/djangoapps/contentstore/features/textbooks.py +++ b/cms/djangoapps/contentstore/features/textbooks.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world, step from django.conf import settings diff --git a/cms/djangoapps/contentstore/features/upload.py b/cms/djangoapps/contentstore/features/upload.py index c68636b583..d5f2033904 100644 --- a/cms/djangoapps/contentstore/features/upload.py +++ b/cms/djangoapps/contentstore/features/upload.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world, step from lettuce.django import django_url diff --git a/cms/djangoapps/contentstore/features/video.py b/cms/djangoapps/contentstore/features/video.py index b3777aa57d..fadf63981b 100644 --- a/cms/djangoapps/contentstore/features/video.py +++ b/cms/djangoapps/contentstore/features/video.py @@ -1,4 +1,4 @@ -#pylint: disable=C0111 +# pylint: disable=C0111 from lettuce import world, step from xmodule.modulestore import Location diff --git a/cms/djangoapps/contentstore/tests/test_contentstore.py b/cms/djangoapps/contentstore/tests/test_contentstore.py index 9cb3b58933..26e23f49ca 100644 --- a/cms/djangoapps/contentstore/tests/test_contentstore.py +++ b/cms/djangoapps/contentstore/tests/test_contentstore.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -#pylint: disable=E1101 +# pylint: disable=E1101 import json import mock diff --git a/cms/djangoapps/contentstore/tests/test_import.py b/cms/djangoapps/contentstore/tests/test_import.py index 77bdd05527..dd9bf83a00 100644 --- a/cms/djangoapps/contentstore/tests/test_import.py +++ b/cms/djangoapps/contentstore/tests/test_import.py @@ -1,4 +1,4 @@ -#pylint: disable=E1101 +# pylint: disable=E1101 """ Tests for import_from_xml using the mongo modulestore. """ diff --git a/cms/djangoapps/contentstore/utils.py b/cms/djangoapps/contentstore/utils.py index 4a26d09ae9..a4e13ef343 100644 --- a/cms/djangoapps/contentstore/utils.py +++ b/cms/djangoapps/contentstore/utils.py @@ -1,4 +1,4 @@ -#pylint: disable=E1103, E1101 +# pylint: disable=E1103, E1101 import copy import logging diff --git a/cms/djangoapps/contentstore/views/error.py b/cms/djangoapps/contentstore/views/error.py index 9983987d29..40e117fc18 100644 --- a/cms/djangoapps/contentstore/views/error.py +++ b/cms/djangoapps/contentstore/views/error.py @@ -1,4 +1,4 @@ -#pylint: disable=C0111,W0613 +# pylint: disable=C0111,W0613 from django.http import (HttpResponse, HttpResponseServerError, HttpResponseNotFound) diff --git a/cms/djangoapps/contentstore/views/tests/test_assets.py b/cms/djangoapps/contentstore/views/tests/test_assets.py index 8d7b2a9008..ff1335367a 100644 --- a/cms/djangoapps/contentstore/views/tests/test_assets.py +++ b/cms/djangoapps/contentstore/views/tests/test_assets.py @@ -2,9 +2,9 @@ Unit tests for the asset upload endpoint. """ -#pylint: disable=C0111 -#pylint: disable=W0621 -#pylint: disable=W0212 +# pylint: disable=C0111 +# pylint: disable=W0621 +# pylint: disable=W0212 from datetime import datetime from io import BytesIO diff --git a/cms/envs/bok_choy.py b/cms/envs/bok_choy.py index b088ccd880..a17e47f5ce 100644 --- a/cms/envs/bok_choy.py +++ b/cms/envs/bok_choy.py @@ -13,7 +13,7 @@ from path import path # This is a convenience for ensuring (a) that we can consistently find the files # and (b) that the files are the same in Jenkins as in local dev. os.environ['SERVICE_VARIANT'] = 'bok_choy' -os.environ['CONFIG_ROOT'] = path(__file__).abspath().dirname() #pylint: disable=E1120 +os.environ['CONFIG_ROOT'] = path(__file__).abspath().dirname() # pylint: disable=E1120 from .aws import * # pylint: disable=W0401, W0614 @@ -23,13 +23,13 @@ from .aws import * # pylint: disable=W0401, W0614 INSTALLED_APPS += ('django_extensions',) # Redirect to the test_root folder within the repo -TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root" #pylint: disable=E1120 +TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root" # pylint: disable=E1120 GITHUB_REPO_ROOT = (TEST_ROOT / "data").abspath() LOG_DIR = (TEST_ROOT / "log").abspath() # Configure Mongo modulestore to use the test folder within the repo for store in ["default", "direct"]: - MODULESTORE[store]['OPTIONS']['fs_root'] = (TEST_ROOT / "data").abspath() #pylint: disable=E1120 + MODULESTORE[store]['OPTIONS']['fs_root'] = (TEST_ROOT / "data").abspath() # pylint: disable=E1120 # Enable django-pipeline and staticfiles STATIC_ROOT = (TEST_ROOT / "staticfiles").abspath() diff --git a/cms/envs/debug_upload.py b/cms/envs/debug_upload.py index 56e9f39bd5..58f31a99e0 100644 --- a/cms/envs/debug_upload.py +++ b/cms/envs/debug_upload.py @@ -1,4 +1,4 @@ -#pylint: disable=W0614, W0401 +# pylint: disable=W0614, W0401 from .dev import * FILE_UPLOAD_HANDLERS = ( diff --git a/cms/urls.py b/cms/urls.py index 063995117e..b9c9e0e785 100644 --- a/cms/urls.py +++ b/cms/urls.py @@ -137,6 +137,6 @@ if settings.DEBUG: pass # Custom error pages -#pylint: disable=C0103 +# pylint: disable=C0103 handler404 = 'contentstore.views.render_404' handler500 = 'contentstore.views.render_500' diff --git a/common/djangoapps/contentserver/tests/test.py b/common/djangoapps/contentserver/tests/test.py index ce934c1ded..334b10ca00 100644 --- a/common/djangoapps/contentserver/tests/test.py +++ b/common/djangoapps/contentserver/tests/test.py @@ -89,7 +89,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): """ self.client.logout() resp = self.client.get(self.url_unlocked) - self.assertEqual(resp.status_code, 200) #pylint: disable=E1103 + self.assertEqual(resp.status_code, 200) # pylint: disable=E1103 def test_locked_asset_not_logged_in(self): """ @@ -98,7 +98,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): """ self.client.logout() resp = self.client.get(self.url_locked) - self.assertEqual(resp.status_code, 403) #pylint: disable=E1103 + self.assertEqual(resp.status_code, 403) # pylint: disable=E1103 def test_locked_asset_not_registered(self): """ @@ -107,30 +107,30 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): """ self.client.login(username=self.usr, password=self.pwd) resp = self.client.get(self.url_locked) - self.assertEqual(resp.status_code, 403) #pylint: disable=E1103 + self.assertEqual(resp.status_code, 403) # pylint: disable=E1103 def test_locked_asset_registered(self): """ Test that locked assets behave appropriately in case user is logged in and registered for the course. """ - #pylint: disable=E1101 + # pylint: disable=E1101 course_id = "/".join([self.loc_locked.org, self.loc_locked.course, '2012_Fall']) CourseEnrollment.enroll(self.user, course_id) self.assertTrue(CourseEnrollment.is_enrolled(self.user, course_id)) self.client.login(username=self.usr, password=self.pwd) resp = self.client.get(self.url_locked) - self.assertEqual(resp.status_code, 200) #pylint: disable=E1103 + self.assertEqual(resp.status_code, 200) # pylint: disable=E1103 def test_locked_asset_staff(self): """ Test that locked assets behave appropriately in case user is staff. """ - #pylint: disable=E1101 + # pylint: disable=E1101 course_id = "/".join([self.loc_locked.org, self.loc_locked.course, '2012_Fall']) self.client.login(username=self.staff_usr, password=self.staff_pwd) resp = self.client.get(self.url_locked) - self.assertEqual(resp.status_code, 200) #pylint: disable=E1103 + self.assertEqual(resp.status_code, 200) # pylint: disable=E1103 diff --git a/common/djangoapps/terrain/browser.py b/common/djangoapps/terrain/browser.py index 18cd6e71ed..6edd11528c 100644 --- a/common/djangoapps/terrain/browser.py +++ b/common/djangoapps/terrain/browser.py @@ -2,8 +2,8 @@ Browser set up for acceptance tests. """ -#pylint: disable=E1101 -#pylint: disable=W0613 +# pylint: disable=E1101 +# pylint: disable=W0613 from lettuce import before, after, world from splinter.browser import Browser diff --git a/common/djangoapps/terrain/steps.py b/common/djangoapps/terrain/steps.py index da9b88de57..64f1a5e3ba 100644 --- a/common/djangoapps/terrain/steps.py +++ b/common/djangoapps/terrain/steps.py @@ -1,15 +1,15 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 # Disable the "wildcard import" warning so we can bring in all methods from # course helpers and ui helpers -#pylint: disable=W0401 +# pylint: disable=W0401 # Disable the "Unused import %s from wildcard import" warning -#pylint: disable=W0614 +# pylint: disable=W0614 # Disable the "unused argument" warning because lettuce uses "step" -#pylint: disable=W0613 +# pylint: disable=W0613 # django_url is assigned late in the process of loading lettuce, # so we import this as a module, and then read django_url from diff --git a/common/djangoapps/terrain/ui_helpers.py b/common/djangoapps/terrain/ui_helpers.py index 25442edd43..38e984e41a 100644 --- a/common/djangoapps/terrain/ui_helpers.py +++ b/common/djangoapps/terrain/ui_helpers.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world diff --git a/common/lib/extract_tar.py b/common/lib/extract_tar.py index 78a210fac4..e8d7946583 100644 --- a/common/lib/extract_tar.py +++ b/common/lib/extract_tar.py @@ -9,7 +9,7 @@ from os.path import abspath, realpath, dirname, join as joinpath from django.core.exceptions import SuspiciousOperation import logging -log = logging.getLogger(__name__) #pylint: disable=C0103 +log = logging.getLogger(__name__) # pylint: disable=C0103 def resolved(rpath): """ diff --git a/common/lib/xmodule/xmodule/tests/test_capa_module.py b/common/lib/xmodule/xmodule/tests/test_capa_module.py index 8f5094ccd1..7a018147b5 100644 --- a/common/lib/xmodule/xmodule/tests/test_capa_module.py +++ b/common/lib/xmodule/xmodule/tests/test_capa_module.py @@ -2,10 +2,10 @@ """ Tests of the Capa XModule """ -#pylint: disable=C0111 -#pylint: disable=R0904 -#pylint: disable=C0103 -#pylint: disable=C0302 +# pylint: disable=C0111 +# pylint: disable=R0904 +# pylint: disable=C0103 +# pylint: disable=C0302 import datetime import json diff --git a/common/lib/xmodule/xmodule/tests/test_video.py b/common/lib/xmodule/xmodule/tests/test_video.py index 8cc8dc859a..c001615290 100644 --- a/common/lib/xmodule/xmodule/tests/test_video.py +++ b/common/lib/xmodule/xmodule/tests/test_video.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -#pylint: disable=W0212 +# pylint: disable=W0212 """Test for Video Xmodule functional logic. These test data read from xml, not from mongo. diff --git a/common/lib/xmodule/xmodule/tests/test_xml_module.py b/common/lib/xmodule/xmodule/tests/test_xml_module.py index d8192d7a8d..75fc2e46a0 100644 --- a/common/lib/xmodule/xmodule/tests/test_xml_module.py +++ b/common/lib/xmodule/xmodule/tests/test_xml_module.py @@ -1,5 +1,5 @@ # disable missing docstring -#pylint: disable=C0111 +# pylint: disable=C0111 import unittest diff --git a/common/test/acceptance/tests/helpers.py b/common/test/acceptance/tests/helpers.py index b5a84ed01b..7e384bc019 100644 --- a/common/test/acceptance/tests/helpers.py +++ b/common/test/acceptance/tests/helpers.py @@ -10,7 +10,7 @@ def load_data_str(rel_path): Load a file from the "data" directory as a string. `rel_path` is the path relative to the data directory. """ - full_path = path(__file__).abspath().dirname() / "data" / rel_path #pylint: disable=E1120 + full_path = path(__file__).abspath().dirname() / "data" / rel_path # pylint: disable=E1120 with open(full_path) as data_file: return data_file.read() diff --git a/docs/en_us/developers/source/conf.py b/docs/en_us/developers/source/conf.py index cb5cb87933..d29abc1e72 100644 --- a/docs/en_us/developers/source/conf.py +++ b/docs/en_us/developers/source/conf.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- -#pylint: disable=C0103 -#pylint: disable=W0622 -#pylint: disable=W0212 -#pylint: disable=W0613 +# pylint: disable=C0103 +# pylint: disable=W0622 +# pylint: disable=W0212 +# pylint: disable=W0613 import sys, os from path import path diff --git a/lms/djangoapps/courseware/features/certificates.py b/lms/djangoapps/courseware/features/certificates.py index 30449da7bd..91e4f394c5 100644 --- a/lms/djangoapps/courseware/features/certificates.py +++ b/lms/djangoapps/courseware/features/certificates.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world, step from lettuce.django import django_url @@ -186,7 +186,7 @@ def confirm_details_match(step): @step(u'I am at the payment page') def at_the_payment_page(step): - world.wait_for_present('input[name=transactionSignature]') + world.wait_for_present('input[name=transactionSignature]') @step(u'I submit valid payment information$') diff --git a/lms/djangoapps/courseware/features/courseware.py b/lms/djangoapps/courseware/features/courseware.py index 234f3a84d2..b169095a6e 100644 --- a/lms/djangoapps/courseware/features/courseware.py +++ b/lms/djangoapps/courseware/features/courseware.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world, step from lettuce.django import django_url diff --git a/lms/djangoapps/courseware/features/courseware_common.py b/lms/djangoapps/courseware/features/courseware_common.py index aff49d2f9d..1c836f8674 100644 --- a/lms/djangoapps/courseware/features/courseware_common.py +++ b/lms/djangoapps/courseware/features/courseware_common.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world, step diff --git a/lms/djangoapps/courseware/features/events.py b/lms/djangoapps/courseware/features/events.py index 14ebc90207..493622f652 100644 --- a/lms/djangoapps/courseware/features/events.py +++ b/lms/djangoapps/courseware/features/events.py @@ -1,4 +1,4 @@ -#pylint: disable=C0111 +# pylint: disable=C0111 from lettuce import step from lettuce import world diff --git a/lms/djangoapps/courseware/features/help.py b/lms/djangoapps/courseware/features/help.py index cf566ad95f..1b79a7e725 100644 --- a/lms/djangoapps/courseware/features/help.py +++ b/lms/djangoapps/courseware/features/help.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world, step diff --git a/lms/djangoapps/courseware/features/homepage.py b/lms/djangoapps/courseware/features/homepage.py index aea1004c0e..fc5a249cba 100644 --- a/lms/djangoapps/courseware/features/homepage.py +++ b/lms/djangoapps/courseware/features/homepage.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world, step from nose.tools import assert_in, assert_equals # pylint: disable=E0611 diff --git a/lms/djangoapps/courseware/features/login.py b/lms/djangoapps/courseware/features/login.py index 7cdfcd45b6..6d4ed75f54 100644 --- a/lms/djangoapps/courseware/features/login.py +++ b/lms/djangoapps/courseware/features/login.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import step, world from django.contrib.auth.models import User diff --git a/lms/djangoapps/courseware/features/lti.py b/lms/djangoapps/courseware/features/lti.py index a2560a9e61..e32118f421 100644 --- a/lms/djangoapps/courseware/features/lti.py +++ b/lms/djangoapps/courseware/features/lti.py @@ -1,4 +1,4 @@ -#pylint: disable=C0111 +# pylint: disable=C0111 import datetime import os import pytz diff --git a/lms/djangoapps/courseware/features/navigation.py b/lms/djangoapps/courseware/features/navigation.py index 3078cc1140..24dc031b39 100644 --- a/lms/djangoapps/courseware/features/navigation.py +++ b/lms/djangoapps/courseware/features/navigation.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world, step from common import course_id, course_location diff --git a/lms/djangoapps/courseware/features/openended.py b/lms/djangoapps/courseware/features/openended.py index 92a597f074..08d892b5c2 100644 --- a/lms/djangoapps/courseware/features/openended.py +++ b/lms/djangoapps/courseware/features/openended.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world, step from lettuce.django import django_url diff --git a/lms/djangoapps/courseware/features/problems_setup.py b/lms/djangoapps/courseware/features/problems_setup.py index 26867188ab..1ab31f981c 100644 --- a/lms/djangoapps/courseware/features/problems_setup.py +++ b/lms/djangoapps/courseware/features/problems_setup.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 #EVERY PROBLEM TYPE MUST HAVE THE FOLLOWING: # -Section in Dictionary containing: diff --git a/lms/djangoapps/courseware/features/signup.py b/lms/djangoapps/courseware/features/signup.py index c12af6c47b..0113662327 100644 --- a/lms/djangoapps/courseware/features/signup.py +++ b/lms/djangoapps/courseware/features/signup.py @@ -1,5 +1,5 @@ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world, step diff --git a/lms/djangoapps/courseware/features/video.py b/lms/djangoapps/courseware/features/video.py index 5bc9e8a0ea..e48a7627d5 100644 --- a/lms/djangoapps/courseware/features/video.py +++ b/lms/djangoapps/courseware/features/video.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -#pylint: disable=C0111 +# pylint: disable=C0111 from lettuce import world, step import os diff --git a/lms/djangoapps/courseware/features/word_cloud.py b/lms/djangoapps/courseware/features/word_cloud.py index 2fb4f2eee9..90f6f6e8b5 100644 --- a/lms/djangoapps/courseware/features/word_cloud.py +++ b/lms/djangoapps/courseware/features/word_cloud.py @@ -1,4 +1,4 @@ -#pylint: disable=C0111 +# pylint: disable=C0111 from time import sleep diff --git a/lms/djangoapps/django_comment_client/tests/test_utils.py b/lms/djangoapps/django_comment_client/tests/test_utils.py index 53a61ba7e1..0ad65c4881 100644 --- a/lms/djangoapps/django_comment_client/tests/test_utils.py +++ b/lms/djangoapps/django_comment_client/tests/test_utils.py @@ -111,7 +111,7 @@ class CoursewareContextTestCase(ModuleStoreTestCase): ] utils.add_courseware_context(threads, self.course) - def assertThreadCorrect(thread, discussion, expected_title): #pylint: disable=C0103 + def assertThreadCorrect(thread, discussion, expected_title): # pylint: disable=C0103 self.assertEqual( set(thread.keys()), set(["commentable_id", "courseware_url", "courseware_title"]) @@ -146,7 +146,7 @@ class CategoryMapTestCase(ModuleStoreTestCase): self.course.discussion_topics = {} self.course.save() self.discussion_num = 0 - self.maxDiff = None #pylint: disable=C0103 + self.maxDiff = None # pylint: disable=C0103 def create_discussion(self, discussion_category, discussion_target, **kwargs): self.discussion_num += 1 diff --git a/lms/djangoapps/instructor/features/bulk_email.py b/lms/djangoapps/instructor/features/bulk_email.py index 891b174880..4d207e696f 100644 --- a/lms/djangoapps/instructor/features/bulk_email.py +++ b/lms/djangoapps/instructor/features/bulk_email.py @@ -2,8 +2,8 @@ Define steps for bulk email acceptance test. """ -#pylint: disable=C0111 -#pylint: disable=W0621 +# pylint: disable=C0111 +# pylint: disable=W0621 from lettuce import world, step from lettuce.django import mail diff --git a/lms/djangoapps/instructor/tests/test_tools.py b/lms/djangoapps/instructor/tests/test_tools.py index 1389de145a..6f5850f7ee 100644 --- a/lms/djangoapps/instructor/tests/test_tools.py +++ b/lms/djangoapps/instructor/tests/test_tools.py @@ -38,7 +38,7 @@ class TestHandleDashboardError(unittest.TestCase): Test handle_dashboard_error decorator. """ def test_error(self): - #pylint: disable=W0613 + # pylint: disable=W0613 @tools.handle_dashboard_error def view(request, course_id): """ @@ -50,7 +50,7 @@ class TestHandleDashboardError(unittest.TestCase): self.assertEqual(response, {'error': 'Oh noes!'}) def test_no_error(self): - #pylint: disable=W0613 + # pylint: disable=W0613 @tools.handle_dashboard_error def view(request, course_id): """ diff --git a/lms/envs/bok_choy.py b/lms/envs/bok_choy.py index 177bbdcdc4..bc35553c67 100644 --- a/lms/envs/bok_choy.py +++ b/lms/envs/bok_choy.py @@ -5,7 +5,7 @@ Settings for bok choy tests import os from path import path -CONFIG_ROOT = path(__file__).abspath().dirname() #pylint: disable=E1120 +CONFIG_ROOT = path(__file__).abspath().dirname() # pylint: disable=E1120 TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root" ########################## Prod-like settings ###################################