From f663a7fe8d817fd433e5e508b0acba9c36e1e116 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sun, 30 Nov 2014 17:48:56 -0500 Subject: [PATCH] s/pylint: disable=W0612/pylint: disable=unused-variable/ --- common/lib/xmodule/xmodule/tests/test_progress.py | 10 +++++----- lms/djangoapps/instructor/views/api.py | 2 +- lms/djangoapps/shoppingcart/models.py | 4 ++-- lms/djangoapps/shoppingcart/tests/test_views.py | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/common/lib/xmodule/xmodule/tests/test_progress.py b/common/lib/xmodule/xmodule/tests/test_progress.py index 74835ffc97..d821f557ad 100644 --- a/common/lib/xmodule/xmodule/tests/test_progress.py +++ b/common/lib/xmodule/xmodule/tests/test_progress.py @@ -23,12 +23,12 @@ class ProgressTest(unittest.TestCase): def test_create_object(self): # These should work: - prg1 = Progress(0, 2) # pylint: disable=W0612 - prg2 = Progress(1, 2) # pylint: disable=W0612 - prg3 = Progress(2, 2) # pylint: disable=W0612 + prg1 = Progress(0, 2) # pylint: disable=unused-variable + prg2 = Progress(1, 2) # pylint: disable=unused-variable + prg3 = Progress(2, 2) # pylint: disable=unused-variable - prg4 = Progress(2.5, 5.0) # pylint: disable=W0612 - prg5 = Progress(3.7, 12.3333) # pylint: disable=W0612 + prg4 = Progress(2.5, 5.0) # pylint: disable=unused-variable + prg5 = Progress(3.7, 12.3333) # pylint: disable=unused-variable # These shouldn't self.assertRaises(ValueError, Progress, 0, 0) diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index e1c6659a1b..9e6013a350 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -811,7 +811,7 @@ def get_sale_order_records(request, course_id): # pylint: disable=unused-argume db_columns = [x[0] for x in query_features] csv_columns = [x[1] for x in query_features] sale_data = instructor_analytics.basic.sale_order_record_features(course_id, db_columns) - header, datarows = instructor_analytics.csvs.format_dictlist(sale_data, db_columns) # pylint: disable=W0612 + header, datarows = instructor_analytics.csvs.format_dictlist(sale_data, db_columns) # pylint: disable=unused-variable return instructor_analytics.csvs.create_csv_response("e-commerce_sale_order_records.csv", csv_columns, datarows) diff --git a/lms/djangoapps/shoppingcart/models.py b/lms/djangoapps/shoppingcart/models.py index ac2d40eda5..8a67b37a14 100644 --- a/lms/djangoapps/shoppingcart/models.py +++ b/lms/djangoapps/shoppingcart/models.py @@ -1026,7 +1026,7 @@ class CourseRegCodeItem(OrderItem): super(CourseRegCodeItem, cls).add_to_order(order, course_id, cost, currency=currency) - item, created = cls.objects.get_or_create(order=order, user=order.user, course_id=course_id) # pylint: disable=W0612 + item, created = cls.objects.get_or_create(order=order, user=order.user, course_id=course_id) # pylint: disable=unused-variable item.status = order.status item.mode = course_mode.slug item.unit_cost = cost @@ -1057,7 +1057,7 @@ class CourseRegCodeItem(OrderItem): # file, but there's also a shared dependency on a random string generator which # is in another PR (for another feature) from instructor.views.api import save_registration_code - for i in range(total_registration_codes): # pylint: disable=W0612 + for i in range(total_registration_codes): # pylint: disable=unused-variable save_registration_code(self.user, self.course_id, invoice=None, order=self.order) log.info("Enrolled {0} in paid course {1}, paid ${2}" diff --git a/lms/djangoapps/shoppingcart/tests/test_views.py b/lms/djangoapps/shoppingcart/tests/test_views.py index b16749e2e5..ea453e77fb 100644 --- a/lms/djangoapps/shoppingcart/tests/test_views.py +++ b/lms/djangoapps/shoppingcart/tests/test_views.py @@ -1095,7 +1095,7 @@ class RegistrationCodeRedemptionCourseEnrollment(ModuleStoreTestCase): cache.clear() url = reverse('register_code_redemption', args=['asdasd']) self.login_user() - for i in xrange(30): # pylint: disable=W0612 + for i in xrange(30): # pylint: disable=unused-variable response = self.client.post(url, **{'HTTP_HOST': 'localhost'}) self.assertEquals(response.status_code, 404) @@ -1119,7 +1119,7 @@ class RegistrationCodeRedemptionCourseEnrollment(ModuleStoreTestCase): cache.clear() url = reverse('register_code_redemption', args=['asdasd']) self.login_user() - for i in xrange(30): # pylint: disable=W0612 + for i in xrange(30): # pylint: disable=unused-variable response = self.client.get(url, **{'HTTP_HOST': 'localhost'}) self.assertEquals(response.status_code, 404)