diff --git a/case_mapping/directory.py b/case_mapping/directory.py index d0f941b..7ccb243 100644 --- a/case_mapping/directory.py +++ b/case_mapping/directory.py @@ -1,8 +1,9 @@ +from .base import FacetEntity from .case import * from .uco import * -submodules = [v for k, v in globals().items() if k[:2] != "__"] +submodules = [v for k, v in globals().items() if k[:2] != "__" and k != "FacetEntity"] -directory = dict() +directory: dict[str, type[FacetEntity]] = dict() for submodule in submodules: directory |= submodule.directory diff --git a/example.py b/example.py index 0f2d43d..532dfc8 100644 --- a/example.py +++ b/example.py @@ -2,7 +2,7 @@ import cdo_local_uuid -from case_mapping import case, uco +from case_mapping import base, case, uco # This is part of enabling non-random UUIDs for the demonstration # output. The other part is handled at call time, and can be seen in @@ -28,7 +28,7 @@ def _next_timestamp() -> datetime: # Generate a case bundle and list to hold investigation items bundle = uco.core.Bundle(description="An Example Case File") -investigation_items = [] +investigation_items: list[base.FacetEntity] = [] ################################### # An item to be added to the case #