diff --git a/metadata-ingestion/src/gometa/ingestion/api/common.py b/metadata-ingestion/src/gometa/ingestion/api/common.py index 3ea0158bc2..e563ddc479 100644 --- a/metadata-ingestion/src/gometa/ingestion/api/common.py +++ b/metadata-ingestion/src/gometa/ingestion/api/common.py @@ -9,11 +9,14 @@ class RecordEnvelope(Generic[T]): record: T metadata: dict - @dataclass -class WorkUnit(metaclass=ABCMeta): +class _WorkUnitId(metaclass=ABCMeta): id: str +# For information on why the WorkUnit class is structured this way +# and is separating the dataclass portion from the abstract methods, see +# https://github.com/python/mypy/issues/5374#issuecomment-568335302. +class WorkUnit(_WorkUnitId, metaclass=ABCMeta): @abstractmethod def get_metadata(self) -> dict: pass