15 lines
302 B
Python
15 lines
302 B
Python
"""Parser base class."""
|
|||
|
|
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from abc import ABC, abstractmethod
|
||
|
|
from pathlib import Path
|
||
|
|
|
||
|
|
from rag_cut.models import Block
|
||
|
|
|
||
|
|
|
||
|
|
class BaseParser(ABC):
|
||
|
|
@abstractmethod
|
||
|
|
def parse(self, path: Path, assets_dir: Path) -> list[Block]:
|
||
|
|
raise NotImplementedError
|