From 0bf470ff6d5eeeff7397806c4eccc2c7fca8f7d8 Mon Sep 17 00:00:00 2001 From: zmezei Date: Tue, 4 Jul 2023 00:32:34 +0100 Subject: [PATCH] rename var --- src/uagents/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/uagents/models.py b/src/uagents/models.py index 0bcf1b27..6bccb590 100644 --- a/src/uagents/models.py +++ b/src/uagents/models.py @@ -40,8 +40,8 @@ def _refresh_schema_cache(model: Type["Model"]): @staticmethod def build_schema_digest(model: Union["Model", Type["Model"]]) -> str: orig_descriptions: Dict[str, Union[str, Dict]] = {} - obj_for_descr_remove = model if isinstance(model, type) else model.__class__ - Model._remove_descriptions(obj_for_descr_remove, orig_descriptions) + type_obj = model if isinstance(model, type) else model.__class__ + Model._remove_descriptions(type_obj, orig_descriptions) digest = ( hashlib.sha256( model.schema_json(indent=None, sort_keys=True).encode("utf8") @@ -49,8 +49,8 @@ def build_schema_digest(model: Union["Model", Type["Model"]]) -> str: .digest() .hex() ) - Model._restore_descriptions(obj_for_descr_remove, orig_descriptions) - Model._refresh_schema_cache(obj_for_descr_remove) + Model._restore_descriptions(type_obj, orig_descriptions) + Model._refresh_schema_cache(type_obj) return f"model:{digest}"