diff --git a/cms/djangoapps/contentstore/tests/test_i18n.py b/cms/djangoapps/contentstore/tests/test_i18n.py index d9843cb621..3072bbee11 100644 --- a/cms/djangoapps/contentstore/tests/test_i18n.py +++ b/cms/djangoapps/contentstore/tests/test_i18n.py @@ -58,7 +58,7 @@ class InternationalizationTest(ModuleStoreTestCase): resp = self.client.get_html('/course/', {}, HTTP_ACCEPT_LANGUAGE='en' - ) + ) self.assertContains(resp, '

My Courses

', diff --git a/common/djangoapps/status/tests.py b/common/djangoapps/status/tests.py index e4f750d8c1..20787e1ed6 100644 --- a/common/djangoapps/status/tests.py +++ b/common/djangoapps/status/tests.py @@ -47,7 +47,7 @@ class TestStatus(TestCase): (global_only, "Hello, Globe", "Hello, Globe", "Hello, Globe"), (toy_only, None, "A toy story", None), (global_and_toy, "Hello, Globe", "Hello, Globe
A toy story", "Hello, Globe"), - ] + ] def setUp(self): """ diff --git a/common/djangoapps/student/management/commands/add_to_group.py b/common/djangoapps/student/management/commands/add_to_group.py index bdbb4027f7..66f0f4eaca 100644 --- a/common/djangoapps/student/management/commands/add_to_group.py +++ b/common/djangoapps/student/management/commands/add_to_group.py @@ -21,7 +21,7 @@ class Command(BaseCommand): dest='remove', default=False, help='Remove the user from the group instead of adding it'), - ) + ) args = ' ' help = 'Add a user to a group' diff --git a/common/djangoapps/student/management/commands/set_staff.py b/common/djangoapps/student/management/commands/set_staff.py index 869e37f13b..1556923253 100644 --- a/common/djangoapps/student/management/commands/set_staff.py +++ b/common/djangoapps/student/management/commands/set_staff.py @@ -12,7 +12,7 @@ class Command(BaseCommand): dest='unset', default=False, help='Set is_staff to False instead of True'), - ) + ) args = ' [user|email ...]>' help = """ diff --git a/common/djangoapps/student/middleware.py b/common/djangoapps/student/middleware.py index ccffbb1659..610a00d85a 100644 --- a/common/djangoapps/student/middleware.py +++ b/common/djangoapps/student/middleware.py @@ -27,12 +27,12 @@ class UserStandingMiddleware(object): 'Your account has been disabled. If you believe ' 'this was done in error, please contact us at ' '{link_start}{support_email}{link_end}' - ).format( + ).format( support_email=settings.DEFAULT_FEEDBACK_EMAIL, link_start=u''.format( address=settings.DEFAULT_FEEDBACK_EMAIL, subject_line=_('Disabled Account'), ), link_end=u'' - ) + ) return HttpResponseForbidden(msg) diff --git a/common/djangoapps/student/tests/test_auto_auth.py b/common/djangoapps/student/tests/test_auto_auth.py index f6123d89c3..fd6a8b4092 100644 --- a/common/djangoapps/student/tests/test_auto_auth.py +++ b/common/djangoapps/student/tests/test_auto_auth.py @@ -25,7 +25,7 @@ class AutoAuthEnabledTestCase(UrlResetMixin, TestCase): (COURSE_ID_SPLIT, SlashSeparatedCourseKey.from_deprecated_string(COURSE_ID_SPLIT)), (COURSE_ID_MONGO, CourseLocator.from_string(COURSE_ID_MONGO)), (COURSE_ID_SPLIT, CourseLocator.from_string(COURSE_ID_SPLIT)), - ) + ) @patch.dict("django.conf.settings.FEATURES", {"AUTOMATIC_AUTH_FOR_TESTING": True}) def setUp(self): diff --git a/common/djangoapps/terrain/stubs/comments.py b/common/djangoapps/terrain/stubs/comments.py index 9d8e247a72..b2a072fb37 100644 --- a/common/djangoapps/terrain/stubs/comments.py +++ b/common/djangoapps/terrain/stubs/comments.py @@ -81,7 +81,7 @@ class StubCommentsServiceHandler(StubHttpRequestHandler): "collection": user_threads, "page": page, "num_pages": num_pages - }) + }) else: self.send_response(404, content="404 Not Found") diff --git a/common/djangoapps/terrain/stubs/lti.py b/common/djangoapps/terrain/stubs/lti.py index b3dbcbafd5..7bcf2b9c73 100644 --- a/common/djangoapps/terrain/stubs/lti.py +++ b/common/djangoapps/terrain/stubs/lti.py @@ -124,7 +124,7 @@ class StubLtiHandler(StubHttpRequestHandler): 'Content-Type': 'application/xml', 'X-Requested-With': 'XMLHttpRequest', 'Authorization': self._oauth_sign(url, data) - } + } # Send request ignoring verifirecation of SSL certificate response = requests.post(url, data=data, headers=headers, verify=False) diff --git a/common/djangoapps/terrain/stubs/ora.py b/common/djangoapps/terrain/stubs/ora.py index 8efc5be4aa..b25c021a25 100644 --- a/common/djangoapps/terrain/stubs/ora.py +++ b/common/djangoapps/terrain/stubs/ora.py @@ -526,8 +526,7 @@ class StubOraService(StubHttpService): 'num_graded': self.DUMMY_DATA['problem_list_num_graded'], 'num_pending': self.DUMMY_DATA['problem_list_num_pending'], 'num_required': self.DUMMY_DATA['problem_list_num_required'] - } for location, name in self.problems.items() - ] + } for location, name in self.problems.items()] def register_problem(self, location, name): """ diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index 00600573e7..5dfecc98bf 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -2121,7 +2121,8 @@ class CodeResponse(LoncapaResponse): if not parsed: log.error("Unable to parse external grader message as valid" - " XML: score_msg['msg']=%s", msg) + " XML: score_msg['msg']=%s", msg + ) return fail return (True, score_result['correct'], score_result['score'], msg) diff --git a/common/lib/xmodule/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py index 54f9d0dfa1..c4c9106c81 100644 --- a/common/lib/xmodule/xmodule/course_module.py +++ b/common/lib/xmodule/xmodule/course_module.py @@ -442,7 +442,8 @@ class CourseFields(object): "action_url": "SettingsDetails", "action_text": _("Edit Course Schedule & Details"), "action_external": False}]} - ]) + ] + ) info_sidebar_name = String( display_name=_("Course Info Sidebar Name"), help=_("Enter the heading that you want students to see above your course handouts on the Course Info page. Your course handouts appear in the right panel of the page."), diff --git a/common/lib/xmodule/xmodule/tests/test_peer_grading.py b/common/lib/xmodule/xmodule/tests/test_peer_grading.py index 5267bb53d8..6242893d29 100644 --- a/common/lib/xmodule/xmodule/tests/test_peer_grading.py +++ b/common/lib/xmodule/xmodule/tests/test_peer_grading.py @@ -319,7 +319,7 @@ class PeerGradingModuleLinkedTest(unittest.TestCase, DummyModulestore): 'use_for_single_location': True, 'link_to_location': self.coe_location.to_deprecated_string(), 'graded': True, - }) + }) @property def scope_ids(self): diff --git a/common/test/acceptance/pages/lms/course_nav.py b/common/test/acceptance/pages/lms/course_nav.py index 84da21d6a7..a7bde281a7 100644 --- a/common/test/acceptance/pages/lms/course_nav.py +++ b/common/test/acceptance/pages/lms/course_nav.py @@ -147,7 +147,8 @@ class CourseNavPage(PageObject): # It *would* make sense to always get the HTML, but unfortunately # the open tab has some child tags that we don't want. return self.q( - css=subsection_css).map( + css=subsection_css + ).map( lambda el: el.text.strip().split('\n')[0] if el.is_displayed() else el.get_attribute('innerHTML').strip() ).results diff --git a/common/test/acceptance/tests/test_ora.py b/common/test/acceptance/tests/test_ora.py index 6d8770de1b..d3ca5611a8 100644 --- a/common/test/acceptance/tests/test_ora.py +++ b/common/test/acceptance/tests/test_ora.py @@ -80,7 +80,9 @@ class OpenResponseTest(UniqueCourseTest): # This is the interface a student can use to grade his/her peers XBlockFixtureDesc('peergrading', 'Peer Module'), - ))).install() + ) + ) + ).install() # Configure the XQueue stub's response for the text we will submit # The submission text is unique so we can associate each response with a particular test case. diff --git a/docs/en_us/developers/source/conf.py b/docs/en_us/developers/source/conf.py index 724bee93f2..8b90c36f88 100644 --- a/docs/en_us/developers/source/conf.py +++ b/docs/en_us/developers/source/conf.py @@ -134,7 +134,7 @@ MOCK_MODULES = [ 'yaml', 'webob', 'webob.multidict', - ] +] if on_rtd: for mod_name in MOCK_MODULES: diff --git a/docs/en_us/platform_api/source/conf.py b/docs/en_us/platform_api/source/conf.py index 204089f741..1993e41cff 100644 --- a/docs/en_us/platform_api/source/conf.py +++ b/docs/en_us/platform_api/source/conf.py @@ -126,7 +126,7 @@ MOCK_MODULES = [ 'yaml', 'webob', 'webob.multidict', - ] +] if on_rtd: for mod_name in MOCK_MODULES: diff --git a/lms/djangoapps/courseware/features/certificates.py b/lms/djangoapps/courseware/features/certificates.py index 3192d7999b..ed283587cf 100644 --- a/lms/djangoapps/courseware/features/certificates.py +++ b/lms/djangoapps/courseware/features/certificates.py @@ -32,7 +32,7 @@ def create_cert_course(): min_price=16, suggested_prices='32,64,128', currency='usd', - ) + ) def register():