""" Base Generator Abstract base class for all code generators. """ from abc import ABC, abstractmethod from pathlib import Path from typing import Any class BaseGenerator(ABC): """Abstract base for code generators.""" @abstractmethod def generate(self, models: Any, output_path: Path) -> None: """Generate code for the given models to the specified path.""" pass @abstractmethod def file_extension(self) -> str: """Return the file extension for this format.""" pass