Skip to content

Commit

Permalink
avoid reimport, rename var
Browse files Browse the repository at this point in the history
  • Loading branch information
zmezei committed Jul 3, 2023
1 parent 94ee30d commit d5b85f2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/uagents/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from pydantic import BaseModel
from pydantic.schema import model_schema, default_ref_template
from pydantic.main import BaseModel


class Model(BaseModel):
Expand Down Expand Up @@ -39,8 +38,8 @@ def _refresh_schema_cache(
by_alias: bool = True,
ref_template: str = default_ref_template,
):
s = model_schema(model, by_alias, ref_template)
model.__schema_cache__[(True, default_ref_template)] = s
schema = model_schema(model, by_alias, ref_template)
model.__schema_cache__[(True, default_ref_template)] = schema

@staticmethod
def build_schema_digest(model: Union["Model", Type["Model"]]) -> str:
Expand Down

0 comments on commit d5b85f2

Please sign in to comment.