Commit b127d284 by Sarina Canelake

s/pylint: disable=C0103/pylint: disable=invalid-name/

parent 20e2ee9a
...@@ -148,7 +148,7 @@ if settings.DEBUG: ...@@ -148,7 +148,7 @@ if settings.DEBUG:
pass pass
# Custom error pages # Custom error pages
# pylint: disable=C0103 # pylint: disable=invalid-name
handler404 = 'contentstore.views.render_404' handler404 = 'contentstore.views.render_404'
handler500 = 'contentstore.views.render_500' handler500 = 'contentstore.views.render_500'
......
...@@ -13,11 +13,11 @@ class ExternalAuthHelperFnTest(TestCase): ...@@ -13,11 +13,11 @@ class ExternalAuthHelperFnTest(TestCase):
""" """
Tests the _safe_postlogin_redirect function with different values of next Tests the _safe_postlogin_redirect function with different values of next
""" """
HOST = 'testserver' # pylint: disable=C0103 HOST = 'testserver' # pylint: disable=invalid-name
ONSITE1 = '/dashboard' # pylint: disable=C0103 ONSITE1 = '/dashboard' # pylint: disable=invalid-name
ONSITE2 = '/courses/org/num/name/courseware' # pylint: disable=C0103 ONSITE2 = '/courses/org/num/name/courseware' # pylint: disable=invalid-name
ONSITE3 = 'http://{}/my/custom/url'.format(HOST) # pylint: disable=C0103 ONSITE3 = 'http://{}/my/custom/url'.format(HOST) # pylint: disable=invalid-name
OFFSITE1 = 'http://www.attacker.com' # pylint: disable=C0103 OFFSITE1 = 'http://www.attacker.com' # pylint: disable=invalid-name
for redirect_to in [ONSITE1, ONSITE2, ONSITE3]: for redirect_to in [ONSITE1, ONSITE2, ONSITE3]:
redir = _safe_postlogin_redirect(redirect_to, HOST) redir = _safe_postlogin_redirect(redirect_to, HOST)
......
...@@ -582,9 +582,9 @@ class ShibUtilFnTest(TestCase): ...@@ -582,9 +582,9 @@ class ShibUtilFnTest(TestCase):
Tests util functions in shib module Tests util functions in shib module
""" """
def test__flatten_to_ascii(self): def test__flatten_to_ascii(self):
DIACRITIC = u"àèìòùÀÈÌÒÙáéíóúýÁÉÍÓÚÝâêîôûÂÊÎÔÛãñõÃÑÕäëïöüÿÄËÏÖÜŸåÅçÇ" # pylint: disable=C0103 DIACRITIC = u"àèìòùÀÈÌÒÙáéíóúýÁÉÍÓÚÝâêîôûÂÊÎÔÛãñõÃÑÕäëïöüÿÄËÏÖÜŸåÅçÇ" # pylint: disable=invalid-name
STR_DIACRI = "àèìòùÀÈÌÒÙáéíóúýÁÉÍÓÚÝâêîôûÂÊÎÔÛãñõÃÑÕäëïöüÿÄËÏÖÜŸåÅçÇ" # pylint: disable=C0103 STR_DIACRI = "àèìòùÀÈÌÒÙáéíóúýÁÉÍÓÚÝâêîôûÂÊÎÔÛãñõÃÑÕäëïöüÿÄËÏÖÜŸåÅçÇ" # pylint: disable=invalid-name
FLATTENED = u"aeiouAEIOUaeiouyAEIOUYaeiouAEIOUanoANOaeiouyAEIOUYaAcC" # pylint: disable=C0103 FLATTENED = u"aeiouAEIOUaeiouyAEIOUYaeiouAEIOUanoANOaeiouyAEIOUYaAcC" # pylint: disable=invalid-name
self.assertEqual(_flatten_to_ascii('jasön'), 'jason') # umlaut 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('Jason包'), 'Jason') # mandarin, so it just gets dropped
self.assertEqual(_flatten_to_ascii('abc'), 'abc') # pass through self.assertEqual(_flatten_to_ascii('abc'), 'abc') # pass through
......
...@@ -335,9 +335,9 @@ class UtilFnTest(TestCase): ...@@ -335,9 +335,9 @@ class UtilFnTest(TestCase):
""" """
Tests the _parse_course_id_from_string util function Tests the _parse_course_id_from_string util function
""" """
COURSE_ID = u'org/num/run' # pylint: disable=C0103 COURSE_ID = u'org/num/run' # pylint: disable=invalid-name
COURSE_URL = u'/courses/{}/otherstuff'.format(COURSE_ID) # pylint: disable=C0103 COURSE_URL = u'/courses/{}/otherstuff'.format(COURSE_ID) # pylint: disable=invalid-name
NON_COURSE_URL = u'/blahblah' # pylint: disable=C0103 NON_COURSE_URL = u'/blahblah' # pylint: disable=invalid-name
self.assertEqual( self.assertEqual(
_parse_course_id_from_string(COURSE_URL), _parse_course_id_from_string(COURSE_URL),
SlashSeparatedCourseKey.from_deprecated_string(COURSE_ID) SlashSeparatedCourseKey.from_deprecated_string(COURSE_ID)
...@@ -415,7 +415,7 @@ class ExternalAuthShibTest(ModuleStoreTestCase): ...@@ -415,7 +415,7 @@ class ExternalAuthShibTest(ModuleStoreTestCase):
Tests the redirects when visiting course-specific URL with @login_required. Tests the redirects when visiting course-specific URL with @login_required.
Should vary by course depending on its enrollment_domain 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) noshib_response = self.client.get(TARGET_URL, follow=True)
self.assertEqual(noshib_response.redirect_chain[-1], self.assertEqual(noshib_response.redirect_chain[-1],
('http://testserver/accounts/login?next={url}'.format(url=TARGET_URL), 302)) ('http://testserver/accounts/login?next={url}'.format(url=TARGET_URL), 302))
...@@ -423,7 +423,7 @@ class ExternalAuthShibTest(ModuleStoreTestCase): ...@@ -423,7 +423,7 @@ class ExternalAuthShibTest(ModuleStoreTestCase):
.format(platform_name=settings.PLATFORM_NAME))) .format(platform_name=settings.PLATFORM_NAME)))
self.assertEqual(noshib_response.status_code, 200) 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, shib_response = self.client.get(**{'path': TARGET_URL_SHIB,
'follow': True, 'follow': True,
'REMOTE_USER': self.extauth.external_id, 'REMOTE_USER': self.extauth.external_id,
......
...@@ -110,7 +110,7 @@ from eventtracking import tracker ...@@ -110,7 +110,7 @@ from eventtracking import tracker
log = logging.getLogger("edx.student") log = logging.getLogger("edx.student")
AUDIT_LOG = logging.getLogger("audit") 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): def csrf_token(context):
......
...@@ -35,7 +35,7 @@ class StubYouTubeHandler(StubHttpRequestHandler): ...@@ -35,7 +35,7 @@ class StubYouTubeHandler(StubHttpRequestHandler):
# Default number of seconds to delay the response to simulate network latency. # Default number of seconds to delay the response to simulate network latency.
DEFAULT_DELAY_SEC = 0.5 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. Allow callers to delete all the server configurations using the /del_config URL.
""" """
......
...@@ -63,7 +63,7 @@ log = logging.getLogger(__name__) ...@@ -63,7 +63,7 @@ log = logging.getLogger(__name__)
######################################################################### #########################################################################
registry = TagRegistry() # pylint: disable=C0103 registry = TagRegistry() # pylint: disable=invalid-name
class Status(object): class Status(object):
......
...@@ -55,7 +55,7 @@ log = logging.getLogger(__name__) ...@@ -55,7 +55,7 @@ log = logging.getLogger(__name__)
registry = TagRegistry() registry = TagRegistry()
CorrectMap = correctmap.CorrectMap # pylint: disable=C0103 CorrectMap = correctmap.CorrectMap # pylint: disable=invalid-name
CORRECTMAP_PY = None CORRECTMAP_PY = None
......
...@@ -441,7 +441,7 @@ class MongoModuleStore(ModuleStoreDraftAndPublished, ModuleStoreWriteBase, Mongo ...@@ -441,7 +441,7 @@ class MongoModuleStore(ModuleStoreDraftAndPublished, ModuleStoreWriteBase, Mongo
DEFAULT_ASSET_COLLECTION_NAME = 'assetstore' DEFAULT_ASSET_COLLECTION_NAME = 'assetstore'
# TODO (cpennington): Enable non-filesystem filestores # TODO (cpennington): Enable non-filesystem filestores
# pylint: disable=C0103 # pylint: disable=invalid-name
# pylint: disable=W0201 # pylint: disable=W0201
def __init__(self, contentstore, doc_store_config, fs_root, render_template, def __init__(self, contentstore, doc_store_config, fs_root, render_template,
default_class=None, default_class=None,
......
...@@ -4,7 +4,7 @@ Tests of the Capa XModule ...@@ -4,7 +4,7 @@ Tests of the Capa XModule
""" """
# pylint: disable=missing-docstring # pylint: disable=missing-docstring
# pylint: disable=R0904 # pylint: disable=R0904
# pylint: disable=C0103 # pylint: disable=invalid-name
# pylint: disable=C0302 # pylint: disable=C0302
import datetime import datetime
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# pylint: disable=C0103 # pylint: disable=invalid-name
# pylint: disable=W0622 # pylint: disable=W0622
# pylint: disable=W0212 # pylint: disable=W0212
# pylint: disable=W0613 # pylint: disable=W0613
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# pylint: disable=C0103 # pylint: disable=invalid-name
# pylint: disable=W0622 # pylint: disable=W0622
# pylint: disable=W0212 # pylint: disable=W0212
# pylint: disable=W0613 # pylint: disable=W0613
......
...@@ -141,7 +141,7 @@ class TestWikiAccessForNumericalCourseNumber(TestWikiAccessBase): ...@@ -141,7 +141,7 @@ class TestWikiAccessForNumericalCourseNumber(TestWikiAccessBase):
wiki_200_page_page = self.create_urlpath(wiki_200_page, 'Grandchild') wiki_200_page_page = self.create_urlpath(wiki_200_page, 'Grandchild')
self.wiki_200_pages = [wiki_200, wiki_200_page, wiki_200_page_page] 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 page in self.wiki_200_pages:
for course_staff in self.course_200_staff: for course_staff in self.course_200_staff:
self.assertTrue(user_is_article_course_staff(course_staff, page.article)) self.assertTrue(user_is_article_course_staff(course_staff, page.article))
......
...@@ -113,7 +113,7 @@ class CoursewareContextTestCase(ModuleStoreTestCase): ...@@ -113,7 +113,7 @@ class CoursewareContextTestCase(ModuleStoreTestCase):
] ]
utils.add_courseware_context(threads, self.course) 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( self.assertEqual(
set(thread.keys()), set(thread.keys()),
set(["commentable_id", "courseware_url", "courseware_title"]) set(["commentable_id", "courseware_url", "courseware_title"])
...@@ -148,7 +148,7 @@ class CategoryMapTestCase(ModuleStoreTestCase): ...@@ -148,7 +148,7 @@ class CategoryMapTestCase(ModuleStoreTestCase):
self.course.discussion_topics = {} self.course.discussion_topics = {}
self.course.save() self.course.save()
self.discussion_num = 0 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): def create_discussion(self, discussion_category, discussion_target, **kwargs):
self.discussion_num += 1 self.discussion_num += 1
......
...@@ -569,7 +569,7 @@ class TestInstructorAPIEnrollment(ModuleStoreTestCase, LoginEnrollmentTestCase): ...@@ -569,7 +569,7 @@ class TestInstructorAPIEnrollment(ModuleStoreTestCase, LoginEnrollmentTestCase):
# uncomment to enable enable printing of large diffs # uncomment to enable enable printing of large diffs
# from failed assertions in the event of a test failure. # from failed assertions in the event of a test failure.
# (comment because pylint C0103) # (comment because pylint C0103(invalid-name))
# self.maxDiff = None # self.maxDiff = None
def tearDown(self): def tearDown(self):
...@@ -1119,7 +1119,7 @@ class TestInstructorAPIBulkBetaEnrollment(ModuleStoreTestCase, LoginEnrollmentTe ...@@ -1119,7 +1119,7 @@ class TestInstructorAPIBulkBetaEnrollment(ModuleStoreTestCase, LoginEnrollmentTe
# uncomment to enable enable printing of large diffs # uncomment to enable enable printing of large diffs
# from failed assertions in the event of a test failure. # from failed assertions in the event of a test failure.
# (comment because pylint C0103) # (comment because pylint C0103(invalid-name))
# self.maxDiff = None # self.maxDiff = None
def test_missing_params(self): def test_missing_params(self):
......
...@@ -65,7 +65,7 @@ ORDER_STATUSES = ( ...@@ -65,7 +65,7 @@ ORDER_STATUSES = (
) )
# we need a tuple to represent the primary key of various OrderItem subclasses # 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): class OrderTypes(object):
......
...@@ -38,7 +38,7 @@ from reverification.models import MidcourseReverificationWindow ...@@ -38,7 +38,7 @@ from reverification.models import MidcourseReverificationWindow
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
def generateUUID(): # pylint: disable=C0103 def generateUUID(): # pylint: disable=invalid-name
""" Utility function; generates UUIDs """ """ Utility function; generates UUIDs """
return str(uuid.uuid4()) return str(uuid.uuid4())
......
...@@ -535,7 +535,7 @@ def reverification_submission_confirmation(_request): ...@@ -535,7 +535,7 @@ def reverification_submission_confirmation(_request):
@login_required @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 Shows the user a confirmation page if the submission to SoftwareSecure was successful
""" """
......
...@@ -22,7 +22,7 @@ Longer TODO: ...@@ -22,7 +22,7 @@ Longer TODO:
# We intentionally define lots of variables that aren't used, and # We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files # 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 sys
import os import os
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment