diff --git a/cms/urls.py b/cms/urls.py index 6548044b96..afdec0eec8 100644 --- a/cms/urls.py +++ b/cms/urls.py @@ -148,7 +148,7 @@ if settings.DEBUG: pass # Custom error pages -# pylint: disable=C0103 +# pylint: disable=invalid-name handler404 = 'contentstore.views.render_404' handler500 = 'contentstore.views.render_500' diff --git a/common/djangoapps/external_auth/tests/test_helper.py b/common/djangoapps/external_auth/tests/test_helper.py index ff463e3355..b7cacae207 100644 --- a/common/djangoapps/external_auth/tests/test_helper.py +++ b/common/djangoapps/external_auth/tests/test_helper.py @@ -13,11 +13,11 @@ class ExternalAuthHelperFnTest(TestCase): """ Tests the _safe_postlogin_redirect function with different values of next """ - HOST = 'testserver' # pylint: disable=C0103 - ONSITE1 = '/dashboard' # pylint: disable=C0103 - ONSITE2 = '/courses/org/num/name/courseware' # pylint: disable=C0103 - ONSITE3 = 'http://{}/my/custom/url'.format(HOST) # pylint: disable=C0103 - OFFSITE1 = 'http://www.attacker.com' # pylint: disable=C0103 + HOST = 'testserver' # pylint: disable=invalid-name + ONSITE1 = '/dashboard' # pylint: disable=invalid-name + ONSITE2 = '/courses/org/num/name/courseware' # pylint: disable=invalid-name + ONSITE3 = 'http://{}/my/custom/url'.format(HOST) # pylint: disable=invalid-name + OFFSITE1 = 'http://www.attacker.com' # pylint: disable=invalid-name for redirect_to in [ONSITE1, ONSITE2, ONSITE3]: redir = _safe_postlogin_redirect(redirect_to, HOST) diff --git a/common/djangoapps/external_auth/tests/test_shib.py b/common/djangoapps/external_auth/tests/test_shib.py index fa09501e41..ac2f49c3d2 100644 --- a/common/djangoapps/external_auth/tests/test_shib.py +++ b/common/djangoapps/external_auth/tests/test_shib.py @@ -582,9 +582,9 @@ class ShibUtilFnTest(TestCase): Tests util functions in shib module """ def test__flatten_to_ascii(self): - DIACRITIC = u"àèìòùÀÈÌÒÙáéíóúýÁÉÍÓÚÝâêîôûÂÊÎÔÛãñõÃÑÕäëïöüÿÄËÏÖÜŸåÅçÇ" # pylint: disable=C0103 - STR_DIACRI = "àèìòùÀÈÌÒÙáéíóúýÁÉÍÓÚÝâêîôûÂÊÎÔÛãñõÃÑÕäëïöüÿÄËÏÖÜŸåÅçÇ" # pylint: disable=C0103 - FLATTENED = u"aeiouAEIOUaeiouyAEIOUYaeiouAEIOUanoANOaeiouyAEIOUYaAcC" # pylint: disable=C0103 + DIACRITIC = u"àèìòùÀÈÌÒÙáéíóúýÁÉÍÓÚÝâêîôûÂÊÎÔÛãñõÃÑÕäëïöüÿÄËÏÖÜŸåÅçÇ" # pylint: disable=invalid-name + STR_DIACRI = "àèìòùÀÈÌÒÙáéíóúýÁÉÍÓÚÝâêîôûÂÊÎÔÛãñõÃÑÕäëïöüÿÄËÏÖÜŸåÅçÇ" # pylint: disable=invalid-name + FLATTENED = u"aeiouAEIOUaeiouyAEIOUYaeiouAEIOUanoANOaeiouyAEIOUYaAcC" # pylint: disable=invalid-name self.assertEqual(_flatten_to_ascii('jasön'), 'jason') # umlaut self.assertEqual(_flatten_to_ascii('Jason包'), 'Jason') # mandarin, so it just gets dropped self.assertEqual(_flatten_to_ascii('abc'), 'abc') # pass through diff --git a/common/djangoapps/student/tests/test_login.py b/common/djangoapps/student/tests/test_login.py index eb3183a4a6..5b51587362 100644 --- a/common/djangoapps/student/tests/test_login.py +++ b/common/djangoapps/student/tests/test_login.py @@ -335,9 +335,9 @@ class UtilFnTest(TestCase): """ Tests the _parse_course_id_from_string util function """ - COURSE_ID = u'org/num/run' # pylint: disable=C0103 - COURSE_URL = u'/courses/{}/otherstuff'.format(COURSE_ID) # pylint: disable=C0103 - NON_COURSE_URL = u'/blahblah' # pylint: disable=C0103 + COURSE_ID = u'org/num/run' # pylint: disable=invalid-name + COURSE_URL = u'/courses/{}/otherstuff'.format(COURSE_ID) # pylint: disable=invalid-name + NON_COURSE_URL = u'/blahblah' # pylint: disable=invalid-name self.assertEqual( _parse_course_id_from_string(COURSE_URL), SlashSeparatedCourseKey.from_deprecated_string(COURSE_ID) @@ -415,7 +415,7 @@ class ExternalAuthShibTest(ModuleStoreTestCase): Tests the redirects when visiting course-specific URL with @login_required. Should vary by course depending on its enrollment_domain """ - TARGET_URL = reverse('courseware', args=[self.course.id.to_deprecated_string()]) # pylint: disable=C0103 + TARGET_URL = reverse('courseware', args=[self.course.id.to_deprecated_string()]) # pylint: disable=invalid-name noshib_response = self.client.get(TARGET_URL, follow=True) self.assertEqual(noshib_response.redirect_chain[-1], ('http://testserver/accounts/login?next={url}'.format(url=TARGET_URL), 302)) @@ -423,7 +423,7 @@ class ExternalAuthShibTest(ModuleStoreTestCase): .format(platform_name=settings.PLATFORM_NAME))) self.assertEqual(noshib_response.status_code, 200) - TARGET_URL_SHIB = reverse('courseware', args=[self.shib_course.id.to_deprecated_string()]) # pylint: disable=C0103 + TARGET_URL_SHIB = reverse('courseware', args=[self.shib_course.id.to_deprecated_string()]) # pylint: disable=invalid-name shib_response = self.client.get(**{'path': TARGET_URL_SHIB, 'follow': True, 'REMOTE_USER': self.extauth.external_id, diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index 9429502cae..f48651f5d3 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -110,7 +110,7 @@ from eventtracking import tracker log = logging.getLogger("edx.student") AUDIT_LOG = logging.getLogger("audit") -ReverifyInfo = namedtuple('ReverifyInfo', 'course_id course_name course_number date status display') # pylint: disable=C0103 +ReverifyInfo = namedtuple('ReverifyInfo', 'course_id course_name course_number date status display') # pylint: disable=invalid-name def csrf_token(context): diff --git a/common/djangoapps/terrain/stubs/youtube.py b/common/djangoapps/terrain/stubs/youtube.py index 823b78fd02..2bf8d7dcf6 100644 --- a/common/djangoapps/terrain/stubs/youtube.py +++ b/common/djangoapps/terrain/stubs/youtube.py @@ -35,7 +35,7 @@ class StubYouTubeHandler(StubHttpRequestHandler): # Default number of seconds to delay the response to simulate network latency. DEFAULT_DELAY_SEC = 0.5 - def do_DELETE(self): # pylint: disable=C0103 + def do_DELETE(self): # pylint: disable=invalid-name """ Allow callers to delete all the server configurations using the /del_config URL. """ diff --git a/common/lib/capa/capa/inputtypes.py b/common/lib/capa/capa/inputtypes.py index f54a02ca03..9b7d3af9c9 100644 --- a/common/lib/capa/capa/inputtypes.py +++ b/common/lib/capa/capa/inputtypes.py @@ -63,7 +63,7 @@ log = logging.getLogger(__name__) ######################################################################### -registry = TagRegistry() # pylint: disable=C0103 +registry = TagRegistry() # pylint: disable=invalid-name class Status(object): diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index 87137039ea..1caa9f07e4 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -55,7 +55,7 @@ log = logging.getLogger(__name__) registry = TagRegistry() -CorrectMap = correctmap.CorrectMap # pylint: disable=C0103 +CorrectMap = correctmap.CorrectMap # pylint: disable=invalid-name CORRECTMAP_PY = None diff --git a/common/lib/xmodule/xmodule/modulestore/mongo/base.py b/common/lib/xmodule/xmodule/modulestore/mongo/base.py index dfd63fbc24..9865491599 100644 --- a/common/lib/xmodule/xmodule/modulestore/mongo/base.py +++ b/common/lib/xmodule/xmodule/modulestore/mongo/base.py @@ -441,7 +441,7 @@ class MongoModuleStore(ModuleStoreDraftAndPublished, ModuleStoreWriteBase, Mongo DEFAULT_ASSET_COLLECTION_NAME = 'assetstore' # TODO (cpennington): Enable non-filesystem filestores - # pylint: disable=C0103 + # pylint: disable=invalid-name # pylint: disable=W0201 def __init__(self, contentstore, doc_store_config, fs_root, render_template, default_class=None, diff --git a/common/lib/xmodule/xmodule/tests/test_capa_module.py b/common/lib/xmodule/xmodule/tests/test_capa_module.py index eb7a01864d..114bbe7191 100644 --- a/common/lib/xmodule/xmodule/tests/test_capa_module.py +++ b/common/lib/xmodule/xmodule/tests/test_capa_module.py @@ -4,7 +4,7 @@ Tests of the Capa XModule """ # pylint: disable=missing-docstring # pylint: disable=R0904 -# pylint: disable=C0103 +# pylint: disable=invalid-name # pylint: disable=C0302 import datetime diff --git a/docs/en_us/developers/source/conf.py b/docs/en_us/developers/source/conf.py index ebe923d233..37e26e20a9 100644 --- a/docs/en_us/developers/source/conf.py +++ b/docs/en_us/developers/source/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# pylint: disable=C0103 +# pylint: disable=invalid-name # pylint: disable=W0622 # pylint: disable=W0212 # pylint: disable=W0613 diff --git a/docs/en_us/platform_api/source/conf.py b/docs/en_us/platform_api/source/conf.py index 9f24a19ae1..52d901bde8 100644 --- a/docs/en_us/platform_api/source/conf.py +++ b/docs/en_us/platform_api/source/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# pylint: disable=C0103 +# pylint: disable=invalid-name # pylint: disable=W0622 # pylint: disable=W0212 # pylint: disable=W0613 diff --git a/lms/djangoapps/course_wiki/tests/test_access.py b/lms/djangoapps/course_wiki/tests/test_access.py index c4bf9e5091..04cbe0e62c 100644 --- a/lms/djangoapps/course_wiki/tests/test_access.py +++ b/lms/djangoapps/course_wiki/tests/test_access.py @@ -141,7 +141,7 @@ class TestWikiAccessForNumericalCourseNumber(TestWikiAccessBase): wiki_200_page_page = self.create_urlpath(wiki_200_page, 'Grandchild') self.wiki_200_pages = [wiki_200, wiki_200_page, wiki_200_page_page] - def test_course_staff_is_course_wiki_staff_for_numerical_course_number(self): # pylint: disable=C0103 + def test_course_staff_is_course_wiki_staff_for_numerical_course_number(self): # pylint: disable=invalid-name for page in self.wiki_200_pages: for course_staff in self.course_200_staff: self.assertTrue(user_is_article_course_staff(course_staff, page.article)) diff --git a/lms/djangoapps/django_comment_client/tests/test_utils.py b/lms/djangoapps/django_comment_client/tests/test_utils.py index 9fd36cfae5..a6c9fc5861 100644 --- a/lms/djangoapps/django_comment_client/tests/test_utils.py +++ b/lms/djangoapps/django_comment_client/tests/test_utils.py @@ -113,7 +113,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=invalid-name self.assertEqual( set(thread.keys()), set(["commentable_id", "courseware_url", "courseware_title"]) @@ -148,7 +148,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=invalid-name def create_discussion(self, discussion_category, discussion_target, **kwargs): self.discussion_num += 1 diff --git a/lms/djangoapps/instructor/tests/test_api.py b/lms/djangoapps/instructor/tests/test_api.py index 1ca5bba6ac..65fca3c5ae 100644 --- a/lms/djangoapps/instructor/tests/test_api.py +++ b/lms/djangoapps/instructor/tests/test_api.py @@ -569,7 +569,7 @@ class TestInstructorAPIEnrollment(ModuleStoreTestCase, LoginEnrollmentTestCase): # uncomment to enable enable printing of large diffs # from failed assertions in the event of a test failure. - # (comment because pylint C0103) + # (comment because pylint C0103(invalid-name)) # self.maxDiff = None def tearDown(self): @@ -1119,7 +1119,7 @@ class TestInstructorAPIBulkBetaEnrollment(ModuleStoreTestCase, LoginEnrollmentTe # uncomment to enable enable printing of large diffs # from failed assertions in the event of a test failure. - # (comment because pylint C0103) + # (comment because pylint C0103(invalid-name)) # self.maxDiff = None def test_missing_params(self): diff --git a/lms/djangoapps/shoppingcart/models.py b/lms/djangoapps/shoppingcart/models.py index 360bcb8a25..e3c22e63b6 100644 --- a/lms/djangoapps/shoppingcart/models.py +++ b/lms/djangoapps/shoppingcart/models.py @@ -65,7 +65,7 @@ ORDER_STATUSES = ( ) # we need a tuple to represent the primary key of various OrderItem subclasses -OrderItemSubclassPK = namedtuple('OrderItemSubclassPK', ['cls', 'pk']) # pylint: disable=C0103 +OrderItemSubclassPK = namedtuple('OrderItemSubclassPK', ['cls', 'pk']) # pylint: disable=invalid-name class OrderTypes(object): diff --git a/lms/djangoapps/verify_student/models.py b/lms/djangoapps/verify_student/models.py index f7c2a2b17d..81b2085e52 100644 --- a/lms/djangoapps/verify_student/models.py +++ b/lms/djangoapps/verify_student/models.py @@ -38,7 +38,7 @@ from reverification.models import MidcourseReverificationWindow log = logging.getLogger(__name__) -def generateUUID(): # pylint: disable=C0103 +def generateUUID(): # pylint: disable=invalid-name """ Utility function; generates UUIDs """ return str(uuid.uuid4()) diff --git a/lms/djangoapps/verify_student/views.py b/lms/djangoapps/verify_student/views.py index e181687edd..b59d425153 100644 --- a/lms/djangoapps/verify_student/views.py +++ b/lms/djangoapps/verify_student/views.py @@ -535,7 +535,7 @@ def reverification_submission_confirmation(_request): @login_required -def midcourse_reverification_confirmation(_request): # pylint: disable=C0103 +def midcourse_reverification_confirmation(_request): # pylint: disable=invalid-name """ Shows the user a confirmation page if the submission to SoftwareSecure was successful """ diff --git a/lms/envs/common.py b/lms/envs/common.py index 8e167c0074..850809dc64 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -22,7 +22,7 @@ Longer TODO: # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files -# pylint: disable=W0401, W0611, W0614, C0103 +# pylint: disable=W0401, W0611, W0614, invalid-name import sys import os