From fc40b2794cb9f060afa2b9c573ac1f84f5d2968c Mon Sep 17 00:00:00 2001 From: dgw Date: Sun, 1 Oct 2023 18:19:29 -0500 Subject: [PATCH] tools.memories: remove obsolete LGTM tricks We aren't using LGTM any more, and thus don't need to trick it into suppressing a warning about attributes that were added to `SopelMemory` vs. the base `dict` object it's extending. I don't think this'll do anything in CI, but it fixes a mypy error that seems to only appear on my system. Since there's no technical reason for these assignments to exist, rather than wast time figuring out how to fix the type-check error, let's just remove them. --- sopel/tools/memories.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sopel/tools/memories.py b/sopel/tools/memories.py index aa21af7db..ab79922a2 100644 --- a/sopel/tools/memories.py +++ b/sopel/tools/memories.py @@ -58,12 +58,6 @@ def __contains__(self, key): self.lock.release() return result - # Needed to make it explicit that we don't care about the `lock` attribute - # when comparing/hashing SopelMemory objects. - __eq__ = dict.__eq__ - __ne__ = dict.__ne__ - __hash__ = dict.__hash__ - class SopelMemoryWithDefault(defaultdict): """Same as SopelMemory, but subclasses from collections.defaultdict.