From f3e17b38dd2c160b6c169424b1015c9743d9a457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Tue, 30 Jan 2024 13:27:59 +0100 Subject: [PATCH] fix: Compatibility with python 3.8 --- pymisp/abstract.py | 2 +- tests/test_mispevent.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pymisp/abstract.py b/pymisp/abstract.py index ec17e0f..c4de2e9 100644 --- a/pymisp/abstract.py +++ b/pymisp/abstract.py @@ -92,7 +92,7 @@ class MISPEncode(JSONEncoder): return JSONEncoder.default(self, obj) -class AbstractMISP(MutableMapping[str, Any], MISPFileCache, metaclass=ABCMeta): +class AbstractMISP(MutableMapping, MISPFileCache, metaclass=ABCMeta): # type: ignore[type-arg] __resources_path = resources_path __misp_objects_path = misp_objects_path __describe_types = describe_types diff --git a/tests/test_mispevent.py b/tests/test_mispevent.py index b5b79e9..d0a3bbd 100644 --- a/tests/test_mispevent.py +++ b/tests/test_mispevent.py @@ -92,7 +92,7 @@ class TestMISPEvent(unittest.TestCase): self.assertEqual(self.mispevent.to_json(sort_keys=True, indent=2), json.dumps(ref_json, sort_keys=True, indent=2)) # Fake setting an attribute ID for testing self.mispevent.attributes[0].id = 42 - self.mispevent.delete_attribute(42) + self.mispevent.delete_attribute('42') with open('tests/mispevent_testfiles/attribute_del.json') as f: ref_json = json.load(f) self.assertEqual(self.mispevent.to_json(sort_keys=True, indent=2), json.dumps(ref_json, sort_keys=True, indent=2))