From c353219a49206068eefaad25f4f75c3fc9cc22e9 Mon Sep 17 00:00:00 2001 From: Christopher Date: Thu, 18 Jul 2024 10:37:00 -0700 Subject: [PATCH] add static methods --- src/aind_slims_api/core.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/aind_slims_api/core.py b/src/aind_slims_api/core.py index bcadd24..b0512fa 100644 --- a/src/aind_slims_api/core.py +++ b/src/aind_slims_api/core.py @@ -99,8 +99,8 @@ def fetch( return records + @staticmethod def resolve_model_alias( - self, model: Type[SlimsBaseModelTypeVar], attr_name: str, ) -> str: @@ -111,8 +111,10 @@ def resolve_model_alias( else: raise ValueError(f"Cannot resolve alias for {attr_name} on {model}") + @staticmethod def _validate_models( - self, model_type: Type[SlimsBaseModelTypeVar], records: list[SlimsRecord] + model_type: Type[SlimsBaseModelTypeVar], + records: list[SlimsRecord] ) -> list[SlimsBaseModelTypeVar]: """Validate a list of SlimsBaseModel objects. Logs errors for records that fail pydantic validation."""