X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=plomtask%2Fdb.py;h=cce2630cd58bfb8bf7283c2eb0d2f45006d8ba26;hb=c021152e6566c8374170de916c69d6b5c816cd54;hp=797b08e8412809e3ac23bb7f04fc24fef955be03;hpb=8f28c8c685fa91b9cbabb4b424da4091e52058cf;p=plomtask
diff --git a/plomtask/db.py b/plomtask/db.py
index 797b08e..cce2630 100644
--- a/plomtask/db.py
+++ b/plomtask/db.py
@@ -337,9 +337,8 @@ class BaseModel(Generic[BaseModelId]):
def _get_cached(cls: type[BaseModelInstance],
id_: BaseModelId) -> BaseModelInstance | None:
"""Get object of id_ from class's cache, or None if not found."""
- # pylint: disable=consider-iterating-dictionary
cache = cls.get_cache()
- if id_ in cache.keys():
+ if id_ in cache:
obj = cache[id_]
assert isinstance(obj, cls)
return obj