|
| 1 | +from _typeshed import Incomplete |
| 2 | +from collections.abc import Generator |
| 3 | +from typing import NamedTuple |
| 4 | + |
| 5 | +DIFF_NS: str |
| 6 | +DIFF_PREFIX: str |
| 7 | +INSERT_NAME: Incomplete |
| 8 | +DELETE_NAME: Incomplete |
| 9 | +REPLACE_NAME: Incomplete |
| 10 | +RENAME_NAME: Incomplete |
| 11 | +WS_BOTH: int |
| 12 | +WS_TEXT: int |
| 13 | +WS_TAGS: int |
| 14 | +WS_NONE: int |
| 15 | +T_OPEN: int |
| 16 | +T_CLOSE: int |
| 17 | +T_SINGLE: int |
| 18 | +PLACEHOLDER_START: int |
| 19 | + |
| 20 | +class BaseFormatter: |
| 21 | + def __init__(self, normalize=1, pretty_print: bool = False) -> None: ... |
| 22 | + def prepare(self, left_tree, right_tree) -> None: ... |
| 23 | + def format(self, diff, orig_tree) -> None: ... |
| 24 | + |
| 25 | +class PlaceholderEntry(NamedTuple): |
| 26 | + element: Incomplete |
| 27 | + ttype: Incomplete |
| 28 | + close_ph: Incomplete |
| 29 | + |
| 30 | +class PlaceholderMaker: |
| 31 | + text_tags: Incomplete |
| 32 | + formatting_tags: Incomplete |
| 33 | + placeholder2tag: Incomplete |
| 34 | + tag2placeholder: Incomplete |
| 35 | + placeholder: Incomplete |
| 36 | + diff_tags: Incomplete |
| 37 | + def __init__(self, text_tags=(), formatting_tags=()) -> None: ... |
| 38 | + def get_placeholder(self, element, ttype, close_ph): ... |
| 39 | + def is_placeholder(self, char): ... |
| 40 | + def is_formatting(self, element): ... |
| 41 | + def do_element(self, element) -> None: ... |
| 42 | + def do_tree(self, tree) -> None: ... |
| 43 | + def split_string(self, text): ... |
| 44 | + def undo_string(self, text): ... |
| 45 | + def undo_element(self, elem) -> None: ... |
| 46 | + def undo_tree(self, tree) -> None: ... |
| 47 | + def mark_diff(self, ph, action, attributes=None): ... |
| 48 | + def wrap_diff(self, text, action, attributes=None): ... |
| 49 | + |
| 50 | +class XMLFormatter(BaseFormatter): |
| 51 | + normalize: Incomplete |
| 52 | + pretty_print: Incomplete |
| 53 | + text_tags: Incomplete |
| 54 | + formatting_tags: Incomplete |
| 55 | + use_replace: Incomplete |
| 56 | + placeholderer: Incomplete |
| 57 | + def __init__( |
| 58 | + self, normalize=0, pretty_print: bool = True, text_tags=(), formatting_tags=(), use_replace: bool = False |
| 59 | + ) -> None: ... |
| 60 | + def prepare(self, left_tree, right_tree) -> None: ... |
| 61 | + def finalize(self, result_tree) -> None: ... |
| 62 | + def format(self, diff, orig_tree, differ=None): ... |
| 63 | + def render(self, result): ... |
| 64 | + def handle_action(self, action, result) -> None: ... |
| 65 | + |
| 66 | +class DiffFormatter(BaseFormatter): |
| 67 | + normalize: Incomplete |
| 68 | + def __init__(self, normalize=1, pretty_print: bool = False) -> None: ... |
| 69 | + def prepare(self, left, right) -> None: ... |
| 70 | + def finalize(self, left, right) -> None: ... |
| 71 | + def format(self, diff, orig_tree): ... |
| 72 | + def handle_action(self, action): ... |
| 73 | + |
| 74 | +class XmlDiffFormatter(BaseFormatter): |
| 75 | + normalize: Incomplete |
| 76 | + def __init__(self, normalize=1, pretty_print: bool = False) -> None: ... |
| 77 | + def prepare(self, left, right) -> None: ... |
| 78 | + def finalize(self, left, right) -> None: ... |
| 79 | + def format(self, diff, orig_tree): ... |
| 80 | + def handle_action(self, action, orig_tree) -> Generator[Incomplete, Incomplete]: ... |
0 commit comments