"""Base class for XER table handlers.""" from abc import ABC, abstractmethod class TableHandler(ABC): """Abstract base class for XER table handlers. Each handler is responsible for parsing a specific table type from the XER file and returning structured data. """ @property @abstractmethod def table_name(self) -> str: """Return the XER table name this handler processes (e.g., 'PROJECT', 'TASK').""" ... @abstractmethod def parse_row(self, fields: list[str], values: list[str]) -> dict | None: """Parse a single row of data from the XER file. Args: fields: List of column names from the %F line values: List of values from the %R line Returns: Dictionary of parsed data, or None if the row should be skipped """ ...