refactor: skip a enricher if fields it can provide are already filled

This commit is contained in:
2026-04-03 17:51:59 +02:00
parent 8c3d64d4b8
commit aab23e6b8d
5 changed files with 19 additions and 1 deletions
+4
View File
@@ -22,6 +22,10 @@ class BaseEnricher(ABC):
@abstractmethod
def name(self) -> str: ...
@property
@abstractmethod
def provides(self) -> set[str]: ...
@abstractmethod
def enrich(self, track: TrackMeta) -> Optional[dict]:
"""Return a dict of {field_name: value} for fields this enricher can fill.