diff --git a/concordia/typing/component_v2.py b/concordia/typing/component_v2.py index 6bb923b..b98abff 100644 --- a/concordia/typing/component_v2.py +++ b/concordia/typing/component_v2.py @@ -17,6 +17,8 @@ import abc from collections.abc import Mapping import enum +import types +from typing import Any from concordia.typing import entity as entity_lib @@ -24,6 +26,8 @@ ComponentContext = str ComponentContextMapping = Mapping[ComponentName, ComponentContext] +_EMPTY_MAPPING = types.MappingProxyType({}) + class Phase(enum.Enum): """Phases of a component entity lifecycle. @@ -180,9 +184,9 @@ def update( def get_last_log( self, - ): + ) -> Mapping[str, Any]: """Returns a dictionary with latest log of activity.""" - return None + return _EMPTY_MAPPING class ActingComponent(BaseComponent, metaclass=abc.ABCMeta):