mirror of
https://github.com/Unstructured-IO/unstructured.git
synced 2025-11-15 01:47:27 +00:00
**Summary** Mechanical refactoring in preparation for adding (pre-chunk) `TableSplitter` in a PR stacked on this one.
21 lines
474 B
Python
21 lines
474 B
Python
# pyright: reportPrivateUsage=false
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
from .._types import _DefEtreeParsers
|
|
from ._element import HtmlElement
|
|
|
|
if TYPE_CHECKING:
|
|
from typing_extensions import TypeAlias
|
|
|
|
_HtmlElemParser: TypeAlias = _DefEtreeParsers[HtmlElement]
|
|
|
|
def fragment_fromstring(
|
|
html: str,
|
|
create_parent: bool = False,
|
|
base_url: str | None = None,
|
|
parser: _HtmlElemParser | None = None,
|
|
) -> HtmlElement: ...
|