Files
omniread/omniread/core/parser.pyi

15 lines
368 B
Python

from abc import ABC, abstractmethod
from typing import Generic, TypeVar
from .content import Content, ContentType
T = TypeVar("T")
class BaseParser(ABC, Generic[T]):
supported_types: set[ContentType]
content: Content
def __init__(self, content: Content) -> None: ...
@abstractmethod
def parse(self) -> T: ...
def supports(self) -> bool: ...