From 79b9df119c63e6e947c9bd6c3a26ba3827838a44 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Fri, 9 Sep 2022 12:54:56 +0200 Subject: [PATCH] Add class check in InMemoryStorage.__eq__ --- inmemorystorage/storage.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inmemorystorage/storage.py b/inmemorystorage/storage.py index 94a9846..8ca35bc 100644 --- a/inmemorystorage/storage.py +++ b/inmemorystorage/storage.py @@ -211,4 +211,7 @@ def created_time(self, name): return file.created_at def __eq__(self, other): - return self.filesystem == other.filesystem and self.base_url == other.base_url + return ( + isinstance(other, InMemoryStorage) + and self.filesystem == other.filesystem and self.base_url == other.base_url + )