diff --git a/common/lib/xmodule/xmodule/modulestore/xml.py b/common/lib/xmodule/xmodule/modulestore/xml.py index d92e687fec..cb53668ed8 100644 --- a/common/lib/xmodule/xmodule/modulestore/xml.py +++ b/common/lib/xmodule/xmodule/modulestore/xml.py @@ -706,7 +706,7 @@ class XMLModuleStore(ModuleStoreReadBase): """ return CourseLocator(org, course, run, deprecated=True) - def get_courses(self, depth=0, **kwargs): + def get_courses(self, **kwargs): """ Returns a list of course descriptors. If there were errors on loading, some of these may be ErrorDescriptors instead. diff --git a/lms/djangoapps/bulk_email/tasks.py b/lms/djangoapps/bulk_email/tasks.py index 4cb5384137..09d1ff7cd8 100644 --- a/lms/djangoapps/bulk_email/tasks.py +++ b/lms/djangoapps/bulk_email/tasks.py @@ -92,7 +92,7 @@ BULK_EMAIL_FAILURE_ERRORS = ( ) -def _get_recipient_queryset(user_id, to_option, course_id, course_location): +def _get_recipient_queryset(user_id, to_option, course_id): """ Returns a query set of email recipients corresponding to the requested to_option category. @@ -230,7 +230,7 @@ def perform_delegate_email_batches(entry_id, course_id, task_input, action_name) ) return new_subtask - recipient_qset = _get_recipient_queryset(user_id, to_option, course_id, course.location) + recipient_qset = _get_recipient_queryset(user_id, to_option, course_id) recipient_fields = ['profile__name', 'email'] log.info(u"Task %s: Preparing to queue subtasks for sending emails for course %s, email %s, to_option %s", diff --git a/lms/djangoapps/circuit/views.py b/lms/djangoapps/circuit/views.py index 5af9ce1b44..3e8a39cb43 100644 --- a/lms/djangoapps/circuit/views.py +++ b/lms/djangoapps/circuit/views.py @@ -31,7 +31,7 @@ def circuit_line(circuit): return xml.etree.ElementTree.tostring(circuit_line) -def edit_circuit(request, circuit): +def edit_circuit(_request, circuit): try: sc = ServerCircuit.objects.get(name=circuit) except: diff --git a/lms/djangoapps/courseware/access.py b/lms/djangoapps/courseware/access.py index 8d0ce1a7ca..484c53f347 100644 --- a/lms/djangoapps/courseware/access.py +++ b/lms/djangoapps/courseware/access.py @@ -96,7 +96,7 @@ def has_access(user, action, obj, course_key=None): return _has_access_location(user, action, obj, course_key) if isinstance(obj, basestring): - return _has_access_string(user, action, obj, course_key) + return _has_access_string(user, action, obj) # Passing an unknown object here is a coding error, so rather than # returning a default, complain. @@ -487,7 +487,7 @@ def _has_access_course_key(user, action, course_key): return _dispatch(checkers, action, user, course_key) -def _has_access_string(user, action, perm, course_key): +def _has_access_string(user, action, perm): """ Check if user has certain special access, specified as string. Valid strings: diff --git a/lms/djangoapps/courseware/management/commands/clean_xml.py b/lms/djangoapps/courseware/management/commands/clean_xml.py index 2e87fc5cdf..1b576c264b 100644 --- a/lms/djangoapps/courseware/management/commands/clean_xml.py +++ b/lms/djangoapps/courseware/management/commands/clean_xml.py @@ -45,7 +45,7 @@ def export(course, export_dir): return False -def import_with_checks(course_dir, verbose=True): +def import_with_checks(course_dir): all_ok = True print "Attempting to load '{0}'".format(course_dir) diff --git a/lms/djangoapps/courseware/middleware.py b/lms/djangoapps/courseware/middleware.py index 60b803601a..c7f3218199 100644 --- a/lms/djangoapps/courseware/middleware.py +++ b/lms/djangoapps/courseware/middleware.py @@ -13,7 +13,7 @@ class RedirectUnenrolledMiddleware(object): Catch UserNotEnrolled errors thrown by `get_course_with_access` and redirect users to the course about page """ - def process_exception(self, request, exception): + def process_exception(self, _request, exception): if isinstance(exception, UserNotEnrolled): course_key = exception.course_key return redirect( diff --git a/lms/djangoapps/courseware/tests/test_access.py b/lms/djangoapps/courseware/tests/test_access.py index fe0295819e..bf0daeb872 100644 --- a/lms/djangoapps/courseware/tests/test_access.py +++ b/lms/djangoapps/courseware/tests/test_access.py @@ -88,12 +88,12 @@ class AccessTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase): def test__has_access_string(self): user = Mock(is_staff=True) - self.assertFalse(access._has_access_string(user, 'staff', 'not_global', self.course.course_key)) + self.assertFalse(access._has_access_string(user, 'staff', 'not_global')) user._has_global_staff_access.return_value = True - self.assertTrue(access._has_access_string(user, 'staff', 'global', self.course.course_key)) + self.assertTrue(access._has_access_string(user, 'staff', 'global')) - self.assertRaises(ValueError, access._has_access_string, user, 'not_staff', 'global', self.course.course_key) + self.assertRaises(ValueError, access._has_access_string, user, 'not_staff', 'global') def test__has_access_error_desc(self): descriptor = Mock() diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index b69c5c7fbd..cb7aa58fb0 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -584,7 +584,7 @@ def jump_to_id(request, course_id, module_id): @ensure_csrf_cookie -def jump_to(request, course_id, location): +def jump_to(_request, course_id, location): """ Show the page that contains a specific location. diff --git a/lms/djangoapps/notes/api.py b/lms/djangoapps/notes/api.py index 657e97f92e..920229edaf 100644 --- a/lms/djangoapps/notes/api.py +++ b/lms/djangoapps/notes/api.py @@ -148,7 +148,7 @@ def create(request, course_key): return ApiResponse(http_response=response, data=None) -def read(request, course_key, note_id): # pylint: disable=unused-argument (course_key) +def read(request, _course_key, note_id): ''' Returns a single annotation object. '''