From 250c94dc6a7b85c05fd360f12d19c3d3005afd87 Mon Sep 17 00:00:00 2001 From: Jawayria Date: Thu, 4 Feb 2021 17:49:15 +0500 Subject: [PATCH] BOM-2331: Applied pylint-amnesty to waffle_utils, xblock, xmodule_django, zendesk_proxy, __init__.py --- openedx/core/djangoapps/waffle_utils/__init__.py | 2 +- .../core/djangoapps/waffle_utils/tests/test_views.py | 4 ++-- openedx/core/djangoapps/waffle_utils/views.py | 2 +- openedx/core/djangoapps/xblock/__init__.py | 2 +- openedx/core/djangoapps/xblock/api.py | 2 +- openedx/core/djangoapps/xblock/rest_api/views.py | 4 ++-- .../xblock/runtime/blockstore_field_data.py | 6 +++--- .../djangoapps/xblock/runtime/blockstore_runtime.py | 4 ++-- openedx/core/djangoapps/xblock/runtime/mixin.py | 2 +- .../core/djangoapps/xblock/runtime/olx_parsing.py | 6 +++--- openedx/core/djangoapps/xblock/runtime/runtime.py | 6 +++--- openedx/core/djangoapps/xblock/runtime/serializer.py | 4 ++-- openedx/core/djangoapps/xblock/runtime/shims.py | 8 ++++---- openedx/core/djangoapps/xblock/tests/test_utils.py | 2 +- openedx/core/djangoapps/xblock/utils.py | 2 +- openedx/core/djangoapps/xmodule_django/models.py | 12 ++++++------ .../djangoapps/zendesk_proxy/tests/test_utils.py | 4 ++-- .../djangoapps/zendesk_proxy/tests/test_v0_views.py | 2 +- .../djangoapps/zendesk_proxy/tests/test_v1_views.py | 2 +- openedx/core/djangoapps/zendesk_proxy/v0/views.py | 2 +- openedx/core/djangoapps/zendesk_proxy/v1/views.py | 2 +- 21 files changed, 40 insertions(+), 40 deletions(-) diff --git a/openedx/core/djangoapps/waffle_utils/__init__.py b/openedx/core/djangoapps/waffle_utils/__init__.py index 235d14a739..260f8777ae 100644 --- a/openedx/core/djangoapps/waffle_utils/__init__.py +++ b/openedx/core/djangoapps/waffle_utils/__init__.py @@ -1,4 +1,4 @@ -""" +""" # lint-amnesty, pylint: disable=django-not-configured Extra utilities for waffle: most classes are defined in edx_toggles.toggles (https://edx-toggles.readthedocs.io/), but we keep here some extra classes for usage within edx-platform. These classes cover course override use cases. """ diff --git a/openedx/core/djangoapps/waffle_utils/tests/test_views.py b/openedx/core/djangoapps/waffle_utils/tests/test_views.py index ad6c7d17fa..d5aed9ef14 100644 --- a/openedx/core/djangoapps/waffle_utils/tests/test_views.py +++ b/openedx/core/djangoapps/waffle_utils/tests/test_views.py @@ -21,7 +21,7 @@ TEST_WAFFLE_FLAG = WaffleFlag(TEST_WAFFLE_FLAG_NAMESPACE, "flag", __name__) # TODO: Missing coverage for: # - computed_status -class ToggleStateViewTests(TestCase): +class ToggleStateViewTests(TestCase): # lint-amnesty, pylint: disable=missing-class-docstring def test_success_for_staff(self): response = self._get_toggle_state_response() @@ -159,7 +159,7 @@ class ToggleStateViewTests(TestCase): self.assertEqual("on", course_overrides["my.flag"]["course_overrides"][0]["force"]) self.assertEqual("both", course_overrides["my.flag"]["computed_status"]) - def _get_toggle_state_response(self, is_staff=True): + def _get_toggle_state_response(self, is_staff=True): # lint-amnesty, pylint: disable=missing-function-docstring request = APIRequestFactory().get('/api/toggles/state/') user = UserFactory() user.is_staff = is_staff diff --git a/openedx/core/djangoapps/waffle_utils/views.py b/openedx/core/djangoapps/waffle_utils/views.py index 40d06b9b87..cb6a5f9e96 100644 --- a/openedx/core/djangoapps/waffle_utils/views.py +++ b/openedx/core/djangoapps/waffle_utils/views.py @@ -24,7 +24,7 @@ class ToggleStateView(views.APIView): authentication_classes = (JwtAuthentication, SessionAuthentication,) permission_classes = (permissions.IsAuthenticated, IsStaff,) - def get(self, request): + def get(self, request): # lint-amnesty, pylint: disable=missing-function-docstring response = OrderedDict() response['waffle_flags'] = _get_all_waffle_flags() response['waffle_switches'] = _get_all_waffle_switches() diff --git a/openedx/core/djangoapps/xblock/__init__.py b/openedx/core/djangoapps/xblock/__init__.py index 7b16445048..07b2f57678 100644 --- a/openedx/core/djangoapps/xblock/__init__.py +++ b/openedx/core/djangoapps/xblock/__init__.py @@ -1,3 +1,3 @@ -""" +""" # lint-amnesty, pylint: disable=django-not-configured The new XBlock runtime and related code. """ diff --git a/openedx/core/djangoapps/xblock/api.py b/openedx/core/djangoapps/xblock/api.py index 496219b6c6..94677fbcaf 100644 --- a/openedx/core/djangoapps/xblock/api.py +++ b/openedx/core/djangoapps/xblock/api.py @@ -238,7 +238,7 @@ def get_handler_url(usage_key, handler_name, user): """ usage_key_str = six.text_type(usage_key) site_root_url = get_xblock_app_config().get_site_root_url() - if not user: + if not user: # lint-amnesty, pylint: disable=no-else-raise raise TypeError("Cannot get handler URLs without specifying a specific user ID.") elif user.is_authenticated: user_id = user.id diff --git a/openedx/core/djangoapps/xblock/rest_api/views.py b/openedx/core/djangoapps/xblock/rest_api/views.py index f0c716248f..de3d633d8e 100644 --- a/openedx/core/djangoapps/xblock/rest_api/views.py +++ b/openedx/core/djangoapps/xblock/rest_api/views.py @@ -10,7 +10,7 @@ from django.contrib.auth import get_user_model from django.views.decorators.clickjacking import xframe_options_exempt from django.views.decorators.csrf import csrf_exempt from rest_framework import permissions -from rest_framework.decorators import api_view, permission_classes, authentication_classes +from rest_framework.decorators import api_view, permission_classes, authentication_classes # lint-amnesty, pylint: disable=unused-import from rest_framework.exceptions import PermissionDenied, AuthenticationFailed from rest_framework.response import Response from xblock.django.request import DjangoWebobRequest, webob_to_django_response @@ -135,7 +135,7 @@ def xblock_handler(request, user_id, secure_token, usage_key_str, handler_name, return response -def cors_allow_xblock_handler(sender, request, **kwargs): +def cors_allow_xblock_handler(sender, request, **kwargs): # lint-amnesty, pylint: disable=unused-argument """ Sandboxed XBlocks need to be able to call XBlock handlers via POST, from a different domain. See 'xblock_handler' method for details and how security is diff --git a/openedx/core/djangoapps/xblock/runtime/blockstore_field_data.py b/openedx/core/djangoapps/xblock/runtime/blockstore_field_data.py index 517e93b3e2..b4403473d3 100644 --- a/openedx/core/djangoapps/xblock/runtime/blockstore_field_data.py +++ b/openedx/core/djangoapps/xblock/runtime/blockstore_field_data.py @@ -103,7 +103,7 @@ class BlockstoreFieldData(FieldData): # (see _get_active_block()) and the value is an ActiveBlock object # (which holds olx_hash and changed_fields) self.active_blocks = WeakKeyDictionary() - super(BlockstoreFieldData, self).__init__() + super(BlockstoreFieldData, self).__init__() # lint-amnesty, pylint: disable=super-with-arguments def _getfield(self, block, name): """ @@ -125,7 +125,7 @@ class BlockstoreFieldData(FieldData): if name == CHILDREN_INCLUDES: return # This is a pseudo-field used in conjunction with BlockstoreChildrenData field = self._getfield(block, name) - if field.scope in (Scope.children, Scope.parent): + if field.scope in (Scope.children, Scope.parent): # lint-amnesty, pylint: disable=no-else-raise # This field data store is focused on definition-level field data, and children/parent is mostly # relevant at the usage level. Scope.parent doesn't even seem to be used? raise NotImplementedError("Setting Scope.children/parent is not supported by BlockstoreFieldData.") @@ -278,7 +278,7 @@ class BlockstoreChildrenData(FieldData): """ # The data store that holds Scope.usage and Scope.definition data: self.authored_data_store = blockstore_field_data - super(BlockstoreChildrenData, self).__init__() + super(BlockstoreChildrenData, self).__init__() # lint-amnesty, pylint: disable=super-with-arguments def _check_field(self, block, name): # pylint: disable=unused-argument """ diff --git a/openedx/core/djangoapps/xblock/runtime/blockstore_runtime.py b/openedx/core/djangoapps/xblock/runtime/blockstore_runtime.py index 2f474ebdd2..e8fbf7a4a8 100644 --- a/openedx/core/djangoapps/xblock/runtime/blockstore_runtime.py +++ b/openedx/core/djangoapps/xblock/runtime/blockstore_runtime.py @@ -47,7 +47,7 @@ class BlockstoreXBlockRuntime(XBlockRuntime): try: block_type = self.id_reader.get_block_type(def_id) except NoSuchDefinition: - raise NoSuchUsage(repr(usage_id)) + raise NoSuchUsage(repr(usage_id)) # lint-amnesty, pylint: disable=raise-missing-from keys = ScopeIds(self.user_id, block_type, def_id, usage_id) if self.system.authored_data_store.has_cached_definition(def_id): @@ -192,7 +192,7 @@ def xml_for_definition(definition_key): draft_name=definition_key.draft_name, ) except blockstore_api.BundleFileNotFound: - raise NoSuchDefinition("OLX file {} not found in bundle {}.".format( + raise NoSuchDefinition("OLX file {} not found in bundle {}.".format( # lint-amnesty, pylint: disable=raise-missing-from definition_key.olx_path, definition_key.bundle_uuid, )) node = etree.fromstring(xml_str) diff --git a/openedx/core/djangoapps/xblock/runtime/mixin.py b/openedx/core/djangoapps/xblock/runtime/mixin.py index 7bc14de1ea..968e96fefe 100644 --- a/openedx/core/djangoapps/xblock/runtime/mixin.py +++ b/openedx/core/djangoapps/xblock/runtime/mixin.py @@ -36,7 +36,7 @@ class LmsBlockMixin(XBlockMixin): Copied from lms.djangoapps.lms_xblock.mixin.LmsBlockMixin """ completion_service = self.runtime.service(self, 'completion') - if completion_service is None: + if completion_service is None: # lint-amnesty, pylint: disable=no-else-raise raise JsonHandlerError(500, u"No completion service found") elif not completion_service.completion_tracking_enabled(): raise JsonHandlerError(404, u"Completion tracking is not enabled and API calls are unexpected") diff --git a/openedx/core/djangoapps/xblock/runtime/olx_parsing.py b/openedx/core/djangoapps/xblock/runtime/olx_parsing.py index 9318cf415a..3abbed96b3 100644 --- a/openedx/core/djangoapps/xblock/runtime/olx_parsing.py +++ b/openedx/core/djangoapps/xblock/runtime/olx_parsing.py @@ -33,7 +33,7 @@ def parse_xblock_include(include_node): try: definition_path = include_node.attrib['definition'] except KeyError: - raise BundleFormatException(" is missing the required definition=\"...\" attribute") + raise BundleFormatException(" is missing the required definition=\"...\" attribute") # lint-amnesty, pylint: disable=raise-missing-from usage_hint = include_node.attrib.get("usage", None) link_id = include_node.attrib.get("source", None) # This is pointing to another definition in the same bundle. It looks like: @@ -41,7 +41,7 @@ def parse_xblock_include(include_node): try: block_type, definition_id = definition_path.split("/") except ValueError: - raise BundleFormatException("Invalid definition attribute: {}".format(definition_path)) + raise BundleFormatException("Invalid definition attribute: {}".format(definition_path)) # lint-amnesty, pylint: disable=raise-missing-from return XBlockInclude(link_id=link_id, block_type=block_type, definition_id=definition_id, usage_hint=usage_hint) @@ -69,7 +69,7 @@ def definition_for_include(parsed_include, parent_definition_key): try: link = links[parsed_include.link_id] except KeyError: - raise BundleFormatException("Link not found: {}".format(parsed_include.link_id)) + raise BundleFormatException("Link not found: {}".format(parsed_include.link_id)) # lint-amnesty, pylint: disable=raise-missing-from return BundleDefinitionLocator( bundle_uuid=link.bundle_uuid, block_type=parsed_include.block_type, diff --git a/openedx/core/djangoapps/xblock/runtime/runtime.py b/openedx/core/djangoapps/xblock/runtime/runtime.py index 167066e6cb..ecfe64adf8 100644 --- a/openedx/core/djangoapps/xblock/runtime/runtime.py +++ b/openedx/core/djangoapps/xblock/runtime/runtime.py @@ -72,7 +72,7 @@ class XBlockRuntime(RuntimeShim, Runtime): suppports_state_for_anonymous_users = True def __init__(self, system, user): - super(XBlockRuntime, self).__init__( + super(XBlockRuntime, self).__init__( # lint-amnesty, pylint: disable=super-with-arguments id_reader=system.id_reader, mixins=( LmsBlockMixin, # Adds Non-deprecated LMS/Studio functionality @@ -234,7 +234,7 @@ class XBlockRuntime(RuntimeShim, Runtime): # Otherwise, fall back to the base implementation which loads services # defined in the constructor: if service is None: - service = super(XBlockRuntime, self).service(block, service_name) + service = super(XBlockRuntime, self).service(block, service_name) # lint-amnesty, pylint: disable=super-with-arguments return service def _init_field_data_for_block(self, block): @@ -291,7 +291,7 @@ class XBlockRuntime(RuntimeShim, Runtime): # which create relative URLs (/static/studio/bundles/webpack-foo.js). # We want all resource URLs to be absolute, such as is done when # local_resource_url() is used. - fragment = super(XBlockRuntime, self).render(block, view_name, context) + fragment = super(XBlockRuntime, self).render(block, view_name, context) # lint-amnesty, pylint: disable=super-with-arguments needs_fix = False for resource in fragment.resources: if resource.kind == 'url' and resource.data.startswith('/'): diff --git a/openedx/core/djangoapps/xblock/runtime/serializer.py b/openedx/core/djangoapps/xblock/runtime/serializer.py index 4a6489c831..9694f6a6e5 100644 --- a/openedx/core/djangoapps/xblock/runtime/serializer.py +++ b/openedx/core/djangoapps/xblock/runtime/serializer.py @@ -71,7 +71,7 @@ def serialize_xblock(block): try: child_includes = block.runtime.child_includes_of(block) except AttributeError: - raise RuntimeError("Cannot get child includes of block. Make sure it's using BlockstoreXBlockRuntime") + raise RuntimeError("Cannot get child includes of block. Make sure it's using BlockstoreXBlockRuntime") # lint-amnesty, pylint: disable=raise-missing-from if len(child_includes) != len(block.children): raise RuntimeError( "Mistmatch between block.children and runtime.child_includes_of()." @@ -123,7 +123,7 @@ def override_export_fs(block): XmlParserMixin.export_to_file = lambda _: False # So this applies to child blocks that get loaded during export try: yield fs - except: + except: # lint-amnesty, pylint: disable=try-except-raise raise finally: block.runtime.export_fs = old_export_fs diff --git a/openedx/core/djangoapps/xblock/runtime/shims.py b/openedx/core/djangoapps/xblock/runtime/shims.py index 7b9e695396..01af86f3cf 100644 --- a/openedx/core/djangoapps/xblock/runtime/shims.py +++ b/openedx/core/djangoapps/xblock/runtime/shims.py @@ -24,7 +24,7 @@ class RuntimeShim(object): """ def __init__(self, *args, **kwargs): - super(RuntimeShim, self).__init__(*args, **kwargs) + super(RuntimeShim, self).__init__(*args, **kwargs) # lint-amnesty, pylint: disable=super-with-arguments self._active_block = None def render(self, block, view_name, context=None): @@ -40,7 +40,7 @@ class RuntimeShim(object): old_active_block = self._active_block self._active_block = block try: - return super(RuntimeShim, self).render(block, view_name, context) + return super(RuntimeShim, self).render(block, view_name, context) # lint-amnesty, pylint: disable=super-with-arguments finally: # Reset the active view to what it was before entering this method self._active_block = old_active_block @@ -53,7 +53,7 @@ class RuntimeShim(object): old_active_block = self._active_block self._active_block = block try: - return super(RuntimeShim, self).handle(block, handler_name, request, suffix) + return super(RuntimeShim, self).handle(block, handler_name, request, suffix) # lint-amnesty, pylint: disable=super-with-arguments finally: # Reset the active view to what it was before entering this method self._active_block = old_active_block @@ -358,7 +358,7 @@ class RuntimeShim(object): Get the list of CSS classes that the wrapping
should have for the specified xblock or aside's view. """ - css_classes = super(RuntimeShim, self)._css_classes_for(block, view) + css_classes = super(RuntimeShim, self)._css_classes_for(block, view) # lint-amnesty, pylint: disable=super-with-arguments # Many CSS styles for former XModules use # .xmodule_display.xmodule_VideoBlock # as their selector, so add those classes: diff --git a/openedx/core/djangoapps/xblock/tests/test_utils.py b/openedx/core/djangoapps/xblock/tests/test_utils.py index 5f5e4f6d21..ed5c52641a 100644 --- a/openedx/core/djangoapps/xblock/tests/test_utils.py +++ b/openedx/core/djangoapps/xblock/tests/test_utils.py @@ -7,7 +7,7 @@ import pytest from django.test import override_settings from freezegun import freeze_time -from openedx.core.djangoapps.xblock.utils import ( +from openedx.core.djangoapps.xblock.utils import ( # lint-amnesty, pylint: disable=reimported get_secure_token_for_xblock_handler, validate_secure_token_for_xblock_handler, _get_secure_token_for_xblock_handler, diff --git a/openedx/core/djangoapps/xblock/utils.py b/openedx/core/djangoapps/xblock/utils.py index 877325a86c..81794a0640 100644 --- a/openedx/core/djangoapps/xblock/utils.py +++ b/openedx/core/djangoapps/xblock/utils.py @@ -10,7 +10,7 @@ from uuid import uuid4 import crum from django.conf import settings -from six import text_type +from six import text_type # lint-amnesty, pylint: disable=unused-import def get_secure_token_for_xblock_handler(user_id, block_key_str, time_idx=0): diff --git a/openedx/core/djangoapps/xmodule_django/models.py b/openedx/core/djangoapps/xmodule_django/models.py index 047fc86578..e15cf3ee17 100644 --- a/openedx/core/djangoapps/xmodule_django/models.py +++ b/openedx/core/djangoapps/xmodule_django/models.py @@ -44,7 +44,7 @@ class NoneToEmptyQuerySet(models.query.QuerySet): if key in kwargs and kwargs[key] is None: kwargs[key] = field_object.Empty - return super(NoneToEmptyQuerySet, self)._filter_or_exclude(*args, **kwargs) + return super(NoneToEmptyQuerySet, self)._filter_or_exclude(*args, **kwargs) # lint-amnesty, pylint: disable=super-with-arguments class OpaqueKeyField(opaque_keys.edx.django.models.OpaqueKeyField): @@ -61,7 +61,7 @@ class OpaqueKeyField(opaque_keys.edx.django.models.OpaqueKeyField): def __init__(self, *args, **kwargs): warnings.warn("openedx.core.djangoapps.xmodule_django.models.OpaqueKeyField is deprecated. " "Please use opaque_keys.edx.django.models.OpaqueKeyField instead.", stacklevel=2) - super(OpaqueKeyField, self).__init__(*args, **kwargs) + super(OpaqueKeyField, self).__init__(*args, **kwargs) # lint-amnesty, pylint: disable=super-with-arguments class CourseKeyField(opaque_keys.edx.django.models.CourseKeyField): @@ -71,7 +71,7 @@ class CourseKeyField(opaque_keys.edx.django.models.CourseKeyField): def __init__(self, *args, **kwargs): warnings.warn("openedx.core.djangoapps.xmodule_django.models.LocationKeyField is deprecated. " "Please use opaque_keys.edx.django.models.UsageKeyField instead.", stacklevel=2) - super(CourseKeyField, self).__init__(*args, **kwargs) + super(CourseKeyField, self).__init__(*args, **kwargs) # lint-amnesty, pylint: disable=super-with-arguments class UsageKeyField(opaque_keys.edx.django.models.UsageKeyField): @@ -81,7 +81,7 @@ class UsageKeyField(opaque_keys.edx.django.models.UsageKeyField): def __init__(self, *args, **kwargs): warnings.warn("openedx.core.djangoapps.xmodule_django.models.UsageKeyField is deprecated. " "Please use opaque_keys.edx.django.models.UsageKeyField instead.", stacklevel=2) - super(UsageKeyField, self).__init__(*args, **kwargs) + super(UsageKeyField, self).__init__(*args, **kwargs) # lint-amnesty, pylint: disable=super-with-arguments class UsageKeyWithRunField(opaque_keys.edx.django.models.UsageKeyField): @@ -90,7 +90,7 @@ class UsageKeyWithRunField(opaque_keys.edx.django.models.UsageKeyField): missing `run` values, for old Mongo courses. """ def to_python(self, value): - value = super(UsageKeyWithRunField, self).to_python(value) + value = super(UsageKeyWithRunField, self).to_python(value) # lint-amnesty, pylint: disable=super-with-arguments if value is not None and value.run is None: value = value.replace(course_key=modulestore().fill_in_run(value.course_key)) return value @@ -103,4 +103,4 @@ class BlockTypeKeyField(opaque_keys.edx.django.models.BlockTypeKeyField): def __init__(self, *args, **kwargs): warnings.warn("openedx.core.djangoapps.xmodule_django.models.BlockTypeKeyField is deprecated. " "Please use opaque_keys.edx.django.models.BlockTypeKeyField instead.", stacklevel=2) - super(BlockTypeKeyField, self).__init__(*args, **kwargs) + super(BlockTypeKeyField, self).__init__(*args, **kwargs) # lint-amnesty, pylint: disable=super-with-arguments diff --git a/openedx/core/djangoapps/zendesk_proxy/tests/test_utils.py b/openedx/core/djangoapps/zendesk_proxy/tests/test_utils.py index 5fb616c1f3..c317b90864 100644 --- a/openedx/core/djangoapps/zendesk_proxy/tests/test_utils.py +++ b/openedx/core/djangoapps/zendesk_proxy/tests/test_utils.py @@ -20,7 +20,7 @@ from openedx.core.lib.api.test_utils import ApiTestCase ZENDESK_OAUTH_ACCESS_TOKEN="abcdefghijklmnopqrstuvwxyz1234567890", ZENDESK_GROUP_ID_MAPPING={"Financial Assistance": 123}, ) -class TestUtils(ApiTestCase): +class TestUtils(ApiTestCase): # lint-amnesty, pylint: disable=missing-class-docstring def setUp(self): self.request_data = { 'email': 'JohnQStudent@example.com', @@ -28,7 +28,7 @@ class TestUtils(ApiTestCase): 'subject': 'Python Unit Test Help Request', 'body': "Help! I'm trapped in a unit test factory and I can't get out!", } - return super(TestUtils, self).setUp() + return super(TestUtils, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments @override_settings( ZENDESK_URL=None, diff --git a/openedx/core/djangoapps/zendesk_proxy/tests/test_v0_views.py b/openedx/core/djangoapps/zendesk_proxy/tests/test_v0_views.py index 26dd2644d3..773a31ccce 100644 --- a/openedx/core/djangoapps/zendesk_proxy/tests/test_v0_views.py +++ b/openedx/core/djangoapps/zendesk_proxy/tests/test_v0_views.py @@ -34,7 +34,7 @@ class ZendeskProxyTestCase(ApiTestCase): 'message': "Help! I'm trapped in a unit test factory and I can't get out!", } } - return super(ZendeskProxyTestCase, self).setUp() + return super(ZendeskProxyTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments def test_post(self): with patch('requests.post', return_value=MagicMock(status_code=201)) as mock_post: diff --git a/openedx/core/djangoapps/zendesk_proxy/tests/test_v1_views.py b/openedx/core/djangoapps/zendesk_proxy/tests/test_v1_views.py index 5853e3d8b0..6e4ff9d39f 100644 --- a/openedx/core/djangoapps/zendesk_proxy/tests/test_v1_views.py +++ b/openedx/core/djangoapps/zendesk_proxy/tests/test_v1_views.py @@ -45,7 +45,7 @@ class ZendeskProxyTestCase(ApiTestCase): } ], } - return super(ZendeskProxyTestCase, self).setUp() + return super(ZendeskProxyTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments def test_post(self): with patch('requests.post', return_value=MagicMock(status_code=201)) as mock_post: diff --git a/openedx/core/djangoapps/zendesk_proxy/v0/views.py b/openedx/core/djangoapps/zendesk_proxy/v0/views.py index cbec063975..a7a72b16de 100644 --- a/openedx/core/djangoapps/zendesk_proxy/v0/views.py +++ b/openedx/core/djangoapps/zendesk_proxy/v0/views.py @@ -19,7 +19,7 @@ class ZendeskProxyThrottle(SimpleRateThrottle): """ def __init__(self): self.rate = '{}/hour'.format(ZENDESK_REQUESTS_PER_HOUR) - super(ZendeskProxyThrottle, self).__init__() + super(ZendeskProxyThrottle, self).__init__() # lint-amnesty, pylint: disable=super-with-arguments def get_cache_key(self, request, view): """ diff --git a/openedx/core/djangoapps/zendesk_proxy/v1/views.py b/openedx/core/djangoapps/zendesk_proxy/v1/views.py index 93d21e40e8..6b7799758a 100644 --- a/openedx/core/djangoapps/zendesk_proxy/v1/views.py +++ b/openedx/core/djangoapps/zendesk_proxy/v1/views.py @@ -22,7 +22,7 @@ class ZendeskProxyThrottle(UserRateThrottle): def __init__(self): self.rate = '{}/hour'.format(REQUESTS_PER_HOUR) - super(ZendeskProxyThrottle, self).__init__() + super(ZendeskProxyThrottle, self).__init__() # lint-amnesty, pylint: disable=super-with-arguments class ZendeskPassthroughView(APIView):