From 9cc6e34591216d6065f323639bb8447320428ba7 Mon Sep 17 00:00:00 2001 From: muhammadadeeltajamul Date: Mon, 16 Sep 2024 14:48:31 +0500 Subject: [PATCH] fix: fixed lint errors --- edx_ace/tests/utils/test_signals.py | 1 + edx_ace/utils/signals.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/edx_ace/tests/utils/test_signals.py b/edx_ace/tests/utils/test_signals.py index 10ff8a3..8399c40 100644 --- a/edx_ace/tests/utils/test_signals.py +++ b/edx_ace/tests/utils/test_signals.py @@ -1,6 +1,7 @@ from django.test import TestCase from edx_ace.utils.signals import make_serializable_object + class TestMakeSerializableObject(TestCase): def test_primitive_types(self): self.assertEqual(make_serializable_object(42), 42) diff --git a/edx_ace/utils/signals.py b/edx_ace/utils/signals.py index 68eef7c..6c4ff32 100644 --- a/edx_ace/utils/signals.py +++ b/edx_ace/utils/signals.py @@ -16,7 +16,7 @@ def make_serializable_object(obj): return {key: make_serializable_object(value) for key, value in obj.items()} elif isinstance(obj, list): return [make_serializable_object(element) for element in obj] - except: # pylint: disable=bare-except + except Exception: # pylint: disable=broad-except pass return str(obj)