Commit 2e1400f8 by stv

Fix Pylint: W0613(unused-argument)

parent 416f7090
......@@ -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.
......
......@@ -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",
......
......@@ -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:
......
......@@ -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:
......
......@@ -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)
......
......@@ -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(
......
......@@ -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()
......
......@@ -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.
......
......@@ -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.
'''
......
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