From 84dcbb6dbf9bf74b0c6f9a83bf97957394c45fe7 Mon Sep 17 00:00:00 2001 From: Vioshim <63890837+Vioshim@users.noreply.github.com> Date: Thu, 2 Feb 2023 09:46:03 -0500 Subject: [PATCH] Removed misleading type annotation It's expected to obtain an element that matches the original class, indicating it's a JsonModel makes the type hint ignore the new class it is inheritating currently --- aredis_om/model/model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aredis_om/model/model.py b/aredis_om/model/model.py index bde9110a..a3a70bbe 100644 --- a/aredis_om/model/model.py +++ b/aredis_om/model/model.py @@ -1510,7 +1510,7 @@ def __init__(self, *args, **kwargs): async def save( self, pipeline: Optional[redis.client.Pipeline] = None - ) -> "JsonModel": + ): self.check() db = self._get_db(pipeline) @@ -1559,7 +1559,7 @@ async def update(self, **field_values): await self.save() @classmethod - async def get(cls, pk: Any) -> "JsonModel": + async def get(cls, pk: Any): document = json.dumps(await cls.db().json().get(cls.make_key(pk))) if document == "null": raise NotFoundError