diff --git a/openedx/core/apidocs.py b/openedx/core/apidocs.py index 3651a2162c..86a3847c95 100644 --- a/openedx/core/apidocs.py +++ b/openedx/core/apidocs.py @@ -1,4 +1,4 @@ -""" +""" # lint-amnesty, pylint: disable=django-not-configured Open API support. """ diff --git a/openedx/core/djangolib/blockstore_cache.py b/openedx/core/djangolib/blockstore_cache.py index 46c46237af..df1e3fdf32 100644 --- a/openedx/core/djangolib/blockstore_cache.py +++ b/openedx/core/djangolib/blockstore_cache.py @@ -102,7 +102,7 @@ class BundleCache(object): cache.delete(cache_key) -def _construct_versioned_cache_key(bundle_uuid, version_num, key_parts, draft_name=None): +def _construct_versioned_cache_key(bundle_uuid, version_num, key_parts, draft_name=None): # lint-amnesty, pylint: disable=missing-function-docstring cache_key = str(bundle_uuid) if draft_name: cache_key += ":" + draft_name diff --git a/openedx/core/djangolib/fields.py b/openedx/core/djangolib/fields.py index 6745925191..dc5318bb74 100644 --- a/openedx/core/djangolib/fields.py +++ b/openedx/core/djangolib/fields.py @@ -48,7 +48,7 @@ class BigAutoField(models.AutoField): elif "postgres" in conn_module: return "bigserial" else: - return super(BigAutoField, self).db_type(connection) + return super(BigAutoField, self).db_type(connection) # lint-amnesty, pylint: disable=super-with-arguments def rel_db_type(self, connection): """ diff --git a/openedx/core/djangolib/js_utils.py b/openedx/core/djangolib/js_utils.py index 66e42cb326..79b8070825 100644 --- a/openedx/core/djangolib/js_utils.py +++ b/openedx/core/djangolib/js_utils.py @@ -69,7 +69,7 @@ def dump_js_escaped_json(obj, cls=EdxJSONEncoder): (string) Escaped encoded JSON. """ - obj = list(obj) if isinstance(obj, type({}.values())) else obj + obj = list(obj) if isinstance(obj, type({}.values())) else obj # lint-amnesty, pylint: disable=isinstance-second-argument-not-valid-type json_string = json.dumps(obj, ensure_ascii=True, cls=cls) json_string = _escape_json_for_js(json_string) return json_string diff --git a/openedx/core/djangolib/testing/tests/test_utils.py b/openedx/core/djangolib/testing/tests/test_utils.py index 30b33f8f91..fd55525892 100644 --- a/openedx/core/djangolib/testing/tests/test_utils.py +++ b/openedx/core/djangolib/testing/tests/test_utils.py @@ -19,7 +19,7 @@ class TestGetMockRequest(TestCase): """ Validate the behavior of get_mock_request """ - def setUp(self): + def setUp(self): # lint-amnesty, pylint: disable=super-method-not-called self.addCleanup(set_current_request, None) def test_mock_request_is_request(self): diff --git a/openedx/core/djangolib/testing/utils.py b/openedx/core/djangolib/testing/utils.py index 031ca12ab1..72ffc0c89f 100644 --- a/openedx/core/djangolib/testing/utils.py +++ b/openedx/core/djangolib/testing/utils.py @@ -59,7 +59,7 @@ class CacheIsolationMixin(object): super(CacheIsolationMixin, cls).tearDownClass() def setUp(self): - super(CacheIsolationMixin, self).setUp() + super(CacheIsolationMixin, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments self.clear_caches() self.addCleanup(self.clear_caches) @@ -165,7 +165,7 @@ class _AssertNumQueriesContext(CaptureQueriesContext): self.test_case = test_case self.num = num self.table_blacklist = table_blacklist - super(_AssertNumQueriesContext, self).__init__(connection) + super(_AssertNumQueriesContext, self).__init__(connection) # lint-amnesty, pylint: disable=super-with-arguments def __exit__(self, exc_type, exc_value, traceback): def is_unfiltered_query(query): @@ -185,7 +185,7 @@ class _AssertNumQueriesContext(CaptureQueriesContext): return False return True - super(_AssertNumQueriesContext, self).__exit__(exc_type, exc_value, traceback) + super(_AssertNumQueriesContext, self).__exit__(exc_type, exc_value, traceback) # lint-amnesty, pylint: disable=super-with-arguments if exc_type is not None: return filtered_queries = [query for query in self.captured_queries if is_unfiltered_query(query)] @@ -207,7 +207,7 @@ class FilteredQueryCountMixin(object): assertNumQueries with one that accepts a blacklist of tables to filter out of the count. """ - def assertNumQueries(self, num, func=None, table_blacklist=None, *args, **kwargs): + def assertNumQueries(self, num, func=None, table_blacklist=None, *args, **kwargs): # lint-amnesty, pylint: disable=keyword-arg-before-vararg """ Used to replace Django's assertNumQueries with the same capability, with the addition of the following argument: diff --git a/openedx/core/djangolib/tests/test_js_utils.py b/openedx/core/djangolib/tests/test_js_utils.py index f427335cab..26fbf57bc1 100644 --- a/openedx/core/djangolib/tests/test_js_utils.py +++ b/openedx/core/djangolib/tests/test_js_utils.py @@ -1,4 +1,4 @@ -# pylint: disable=unicode-format-string +# lint-amnesty, pylint: disable=bad-option-value, unicode-format-string # -*- coding: utf-8 -*- """ Tests for js_utils.py @@ -32,7 +32,7 @@ class TestJSUtils(TestCase): A test encoder that is used to prove that the encoder does its job before the escaping. """ # pylint: disable=method-hidden - def default(self, noDefaultEncodingObj): + def default(self, noDefaultEncodingObj): # lint-amnesty, pylint: disable=arguments-differ return noDefaultEncodingObj.value.replace("