Skip to content

Commit

Permalink
add static methods
Browse files Browse the repository at this point in the history
  • Loading branch information
mochic committed Jul 18, 2024
1 parent 5b8d277 commit c353219
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/aind_slims_api/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ def fetch(

return records

@staticmethod
def resolve_model_alias(
self,
model: Type[SlimsBaseModelTypeVar],
attr_name: str,
) -> str:
Expand All @@ -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."""
Expand Down

0 comments on commit c353219

Please sign in to comment.