From f9a0bf268923daa4f1b8a26c08dd5ed95f311aa7 Mon Sep 17 00:00:00 2001 From: Matt Fulp <8397318+fulpm@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:37:46 -0400 Subject: [PATCH] cleanup --- howso/client/api.py | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/howso/client/api.py b/howso/client/api.py index 4c304516..8fc4f42a 100644 --- a/howso/client/api.py +++ b/howso/client/api.py @@ -80,7 +80,7 @@ class EngineApi(TypedDict): labels: Mapping[str, LabelDefinition] """Engine labels.""" - schemas: Mapping[str, Schema | AnyOf] + schemas: Mapping[str, Schema | Ref | AnyOf] """Mapping of shared schemas.""" description: str @@ -131,39 +131,3 @@ def get_api(engine_path: t.Optional[Path] = None) -> EngineApi: finally: amlg.destroy_entity(entity_id) del amlg - - -def get_api_label(label: str) -> LabelDefinition | None: - """ - Get the API definition for a given label. - - Parameters - ---------- - label : str - The label to retrieve. - - Returns - ------- - LabelDefinition or None - The definition of the label, or None if the label is not defined. - """ - api = get_api() - return api["labels"].get(label) - - -def get_api_schema(name: str) -> Schema | Ref | None: - """ - Get a schema definition by name. - - Parameters - ---------- - name : str - The name of the schema to retrieve. - - Returns - ------- - Schema or Ref or None - The schema definition, or None if not found. - """ - api = get_api() - return api["schemas"].get(name)