Commit c0556a7e by Sarina Canelake

s/pylint: disable=W0613/pylint: disable=unused-argument/

parent e45994b2
......@@ -3,7 +3,7 @@
# Lettuce formats proposed definitions for unimplemented steps with the
# argument name "step" instead of "_step" and pylint does not like that.
# pylint: disable=W0613
# pylint: disable=unused-argument
from lettuce import world, step
from nose.tools import assert_true, assert_in, assert_equal # pylint: disable=no-name-in-module
......
# pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
# pylint: disable=W0613
# pylint: disable=unused-argument
from lettuce import world, step
from component_settings_editor_helpers import enter_xml_in_advanced_problem
......
# pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
# pylint: disable=W0613
# pylint: disable=unused-argument
import os
from lettuce import world, step
......
# pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
# pylint: disable=W0613
# pylint: disable=unused-argument
from nose.tools import assert_false # pylint: disable=no-name-in-module
from lettuce import step, world
......
# pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
# pylint: disable=W0613
# pylint: disable=unused-argument
from lettuce import world, step
from nose.tools import assert_equal, assert_in # pylint: disable=no-name-in-module
......
......@@ -3,7 +3,7 @@ Views that are only activated when the project is running in development mode.
These views will NOT be shown on production: trying to access them will result
in a 404 error.
"""
# pylint: disable=W0613
# pylint: disable=unused-argument
from edxmako.shortcuts import render_to_response
from mako.exceptions import TopLevelLookupException
from django.http import HttpResponseNotFound
......
# pylint: disable=missing-docstring,W0613
# pylint: disable=missing-docstring,unused-argument
from django.http import (HttpResponse, HttpResponseServerError,
HttpResponseNotFound)
......
......@@ -585,7 +585,7 @@ def _delete_item(usage_key, user):
store.delete_item(usage_key, user.id)
# pylint: disable=W0613
# pylint: disable=unused-argument
@login_required
@require_http_methods(("GET", "DELETE"))
def orphan_handler(request, course_key_string):
......
......@@ -20,7 +20,7 @@ class CohortFactory(DjangoModelFactory):
group_type = CourseUserGroup.COHORT
@post_generation
def users(self, create, extracted, **kwargs): # pylint: disable=W0613
def users(self, create, extracted, **kwargs): # pylint: disable=unused-argument
"""
Returns the users associated with the cohort.
"""
......
......@@ -36,7 +36,7 @@ class TestTransferStudents(ModuleStoreTestCase):
"""Disconnects the UNENROLL stub receiver."""
UNENROLL_DONE.disconnect(self.assert_unenroll_signal)
def assert_unenroll_signal(self, skip_refund=False, **kwargs): # pylint: disable=W0613
def assert_unenroll_signal(self, skip_refund=False, **kwargs): # pylint: disable=unused-argument
""" Signal Receiver stub for testing that the unenroll signal was fired. """
self.assertFalse(self.signal_fired)
self.assertTrue(skip_refund)
......
......@@ -26,7 +26,7 @@ FAKE_MICROSITE = {
}
def fake_site_name(name, default=None): # pylint: disable=W0613
def fake_site_name(name, default=None): # pylint: disable=unused-argument
"""
create a fake microsite site name
"""
......@@ -36,7 +36,7 @@ def fake_site_name(name, default=None): # pylint: disable=W0613
return default
def fake_microsite_get_value(name, default=None): # pylint: disable=W0613
def fake_microsite_get_value(name, default=None): # pylint: disable=unused-argument
"""
create a fake microsite site name
"""
......
......@@ -1268,7 +1268,7 @@ class AccountValidationError(Exception):
@receiver(post_save, sender=User)
def user_signup_handler(sender, **kwargs): # pylint: disable=W0613
def user_signup_handler(sender, **kwargs): # pylint: disable=unused-argument
"""
handler that saves the user Signup Source
when the user is created
......
......@@ -3,7 +3,7 @@ Browser set up for acceptance tests.
"""
# pylint: disable=no-member
# pylint: disable=W0613
# pylint: disable=unused-argument
from lettuce import before, after, world
from splinter.browser import Browser
......
......@@ -9,7 +9,7 @@
# pylint: disable=W0614
# Disable the "unused argument" warning because lettuce uses "step"
# pylint: disable=W0613
# pylint: disable=unused-argument
# django_url is assigned late in the process of loading lettuce,
# so we import this as a module, and then read django_url from
......
......@@ -18,7 +18,7 @@ from xmodule.modulestore.django import ASSET_IGNORE_REGEX
class MongoContentStore(ContentStore):
# pylint: disable=W0613
# pylint: disable=unused-argument
def __init__(self, host, db, port=27017, user=None, password=None, bucket='fs', collection=None, **kwargs):
"""
Establish the connection with the mongo backend and connect to the collections
......
......@@ -35,7 +35,7 @@ class PersistentCourseFactory(SplitFactory):
"""
FACTORY_FOR = CourseDescriptor
# pylint: disable=W0613
# pylint: disable=unused-argument
@classmethod
def _create(cls, target_class, course='999', run='run', org='testX', user_id=ModuleStoreEnum.UserID.test,
master_branch=ModuleStoreEnum.BranchName.draft, **kwargs):
......@@ -60,7 +60,7 @@ class ItemFactory(SplitFactory):
display_name = factory.LazyAttributeSequence(lambda o, n: "{} {}".format(o.category, n))
# pylint: disable=W0613
# pylint: disable=unused-argument
@classmethod
def _create(cls, target_class, parent_location, category='chapter',
user_id=ModuleStoreEnum.UserID.test, definition_locator=None, force=False,
......
......@@ -95,7 +95,7 @@ def modulestore():
return ModuleStoreNoSettings.modulestore
# pylint: disable=W0613
# pylint: disable=unused-argument
def render_to_template_mock(*args):
pass
......
......@@ -73,7 +73,7 @@ class DiscussionTabSingleThreadTest(UniqueCourseTest):
self.thread_page = DiscussionTabSingleThreadPage(self.browser, self.course_id, thread_id) # pylint:disable=W0201
self.thread_page.visit()
# pylint:disable=W0613
# pylint: disable=unused-argument
def refresh_thread_page(self, thread_id):
self.browser.refresh()
self.thread_page.wait_for_page()
......
......@@ -2,7 +2,7 @@
# pylint: disable=invalid-name
# pylint: disable=W0622
# pylint: disable=W0212
# pylint: disable=W0613
# pylint: disable=unused-argument
import os
from path import path
......
......@@ -2,7 +2,7 @@
# pylint: disable=invalid-name
# pylint: disable=W0622
# pylint: disable=W0212
# pylint: disable=W0613
# pylint: disable=unused-argument
import os
from path import path
......
......@@ -37,7 +37,7 @@ class MockCourseEmailResult(object):
def get_mock_update_subtask_status(self):
"""Wrapper for mock email function."""
def mock_update_subtask_status(entry_id, current_task_id, new_subtask_status): # pylint: disable=W0613
def mock_update_subtask_status(entry_id, current_task_id, new_subtask_status): # pylint: disable=unused-argument
"""Increments count of number of emails sent."""
self.emails_sent += new_subtask_status.succeeded
return update_subtask_status(entry_id, current_task_id, new_subtask_status)
......
......@@ -35,7 +35,7 @@ class WikiAccessMiddleware(object):
# Even though we came from the course, we can't see it. So don't worry about it.
pass
def process_view(self, request, view_func, view_args, view_kwargs): # pylint: disable=W0613
def process_view(self, request, view_func, view_args, view_kwargs): # pylint: disable=unused-argument
"""
This function handles authentication logic for wiki urls and redirects from
the "root wiki" to the "course wiki" if the user accesses the wiki from a course url
......
......@@ -21,7 +21,7 @@ from opaque_keys.edx.locations import SlashSeparatedCourseKey
log = logging.getLogger(__name__)
def root_create(request): # pylint: disable=W0613
def root_create(request): # pylint: disable=unused-argument
"""
In the edX wiki, we don't show the root_create view. Instead, we
just create the root automatically if it doesn't exist.
......@@ -30,7 +30,7 @@ def root_create(request): # pylint: disable=W0613
return redirect('wiki:get', path=root.path)
def course_wiki_redirect(request, course_id): # pylint: disable=W0613
def course_wiki_redirect(request, course_id): # pylint: disable=unused-argument
"""
This redirects to whatever page on the wiki that the course designates
as it's home page. A course's wiki must be an article on the root (for
......
......@@ -79,19 +79,19 @@ REPORTS_DATA = (
@common_exceptions_400
def view_success(request): # pylint: disable=W0613
def view_success(request): # pylint: disable=unused-argument
"A dummy view for testing that returns a simple HTTP response"
return HttpResponse('success')
@common_exceptions_400
def view_user_doesnotexist(request): # pylint: disable=W0613
def view_user_doesnotexist(request): # pylint: disable=unused-argument
"A dummy view that raises a User.DoesNotExist exception"
raise User.DoesNotExist()
@common_exceptions_400
def view_alreadyrunningerror(request): # pylint: disable=W0613
def view_alreadyrunningerror(request): # pylint: disable=unused-argument
"A dummy view that raises an AlreadyRunningError exception"
raise AlreadyRunningError()
......
......@@ -39,7 +39,7 @@ class TestHandleDashboardError(unittest.TestCase):
Test handle_dashboard_error decorator.
"""
def test_error(self):
# pylint: disable=W0613
# pylint: disable=unused-argument
@tools.handle_dashboard_error
def view(request, course_id):
"""
......@@ -51,7 +51,7 @@ class TestHandleDashboardError(unittest.TestCase):
self.assertEqual(response, {'error': 'Oh noes!'})
def test_no_error(self):
# pylint: disable=W0613
# pylint: disable=unused-argument
@tools.handle_dashboard_error
def view(request, course_id):
"""
......
......@@ -747,7 +747,7 @@ def get_grading_config(request, course_id):
@ensure_csrf_cookie
@cache_control(no_cache=True, no_store=True, must_revalidate=True)
@require_level('staff')
def get_sale_records(request, course_id, csv=False): # pylint: disable=W0613, redefined-outer-name
def get_sale_records(request, course_id, csv=False): # pylint: disable=unused-argument, redefined-outer-name
"""
return the summary of all sales records for a particular course
"""
......@@ -778,7 +778,7 @@ def get_sale_records(request, course_id, csv=False): # pylint: disable=W0613, r
@ensure_csrf_cookie
@cache_control(no_cache=True, no_store=True, must_revalidate=True)
@require_level('staff')
def get_sale_order_records(request, course_id): # pylint: disable=W0613, redefined-outer-name
def get_sale_order_records(request, course_id): # pylint: disable=unused-argument, redefined-outer-name
"""
return the summary of all sales records for a particular course
"""
......@@ -878,7 +878,7 @@ def re_validate_invoice(obj_invoice):
@ensure_csrf_cookie
@cache_control(no_cache=True, no_store=True, must_revalidate=True)
@require_level('staff')
def get_purchase_transaction(request, course_id, csv=False): # pylint: disable=W0613, redefined-outer-name
def get_purchase_transaction(request, course_id, csv=False): # pylint: disable=unused-argument, redefined-outer-name
"""
return the summary of all purchased transactions for a particular course
"""
......@@ -906,7 +906,7 @@ def get_purchase_transaction(request, course_id, csv=False): # pylint: disable=
@ensure_csrf_cookie
@cache_control(no_cache=True, no_store=True, must_revalidate=True)
@require_level('staff')
def get_students_features(request, course_id, csv=False): # pylint: disable=W0613, redefined-outer-name
def get_students_features(request, course_id, csv=False): # pylint: disable=redefined-outer-name
"""
Respond with json which contains a summary of all enrolled students profile information.
......@@ -976,7 +976,7 @@ def get_students_features(request, course_id, csv=False): # pylint: disable=W06
@ensure_csrf_cookie
@cache_control(no_cache=True, no_store=True, must_revalidate=True)
@require_level('staff')
def get_coupon_codes(request, course_id): # pylint: disable=W0613
def get_coupon_codes(request, course_id): # pylint: disable=unused-argument
"""
Respond with csv which contains a summary of all Active Coupons.
"""
......@@ -1044,7 +1044,7 @@ def random_code_generator():
@cache_control(no_cache=True, no_store=True, must_revalidate=True)
@require_level('staff')
@require_POST
def get_registration_codes(request, course_id): # pylint: disable=W0613
def get_registration_codes(request, course_id): # pylint: disable=unused-argument
"""
Respond with csv which contains a summary of all Registration Codes.
"""
......@@ -1181,7 +1181,7 @@ def generate_registration_codes(request, course_id):
@cache_control(no_cache=True, no_store=True, must_revalidate=True)
@require_level('staff')
@require_POST
def active_registration_codes(request, course_id): # pylint: disable=W0613
def active_registration_codes(request, course_id): # pylint: disable=unused-argument
"""
Respond with csv which contains a summary of all Active Registration Codes.
"""
......@@ -1208,7 +1208,7 @@ def active_registration_codes(request, course_id): # pylint: disable=W0613
@cache_control(no_cache=True, no_store=True, must_revalidate=True)
@require_level('staff')
@require_POST
def spent_registration_codes(request, course_id): # pylint: disable=W0613
def spent_registration_codes(request, course_id): # pylint: disable=unused-argument
"""
Respond with csv which contains a summary of all Spent(used) Registration Codes.
"""
......@@ -1238,7 +1238,7 @@ def spent_registration_codes(request, course_id): # pylint: disable=W0613
@ensure_csrf_cookie
@cache_control(no_cache=True, no_store=True, must_revalidate=True)
@require_level('staff')
def get_anon_ids(request, course_id): # pylint: disable=W0613
def get_anon_ids(request, course_id): # pylint: disable=unused-argument
"""
Respond with 2-column CSV output of user-id, anonymized-user-id
"""
......@@ -1839,7 +1839,7 @@ def proxy_legacy_analytics(request, course_id):
@require_POST
def get_user_invoice_preference(request, course_id): # pylint: disable=W0613
def get_user_invoice_preference(request, course_id): # pylint: disable=unused-argument
"""
Gets invoice copy user's preferences.
"""
......
......@@ -18,7 +18,7 @@ log = logging.getLogger(__name__)
@require_POST
@login_required
def remove_coupon(request, course_id): # pylint: disable=W0613
def remove_coupon(request, course_id): # pylint: disable=unused-argument
"""
remove the coupon against the coupon id
set the coupon is_active flag to false
......@@ -48,7 +48,7 @@ def remove_coupon(request, course_id): # pylint: disable=W0613
@require_POST
@login_required
def add_coupon(request, course_id): # pylint: disable=W0613
def add_coupon(request, course_id): # pylint: disable=unused-argument
"""
add coupon in the Coupons Table
"""
......@@ -96,7 +96,7 @@ def add_coupon(request, course_id): # pylint: disable=W0613
@require_POST
@login_required
def update_coupon(request, course_id): # pylint: disable=W0613
def update_coupon(request, course_id): # pylint: disable=unused-argument
"""
update the coupon object in the database
"""
......@@ -121,7 +121,7 @@ def update_coupon(request, course_id): # pylint: disable=W0613
@require_POST
@login_required
def get_coupon_info(request, course_id): # pylint: disable=W0613
def get_coupon_info(request, course_id): # pylint: disable=unused-argument
"""
get the coupon information to display in the pop up form
"""
......
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