# encoding: utf-8
# module lxml.html.diff
# from D:\project\A_Board\.venv\Lib\site-packages\lxml\html\diff.cp313-win_amd64.pyd
# by generator 1.147
# no doc

# imports
import builtins as __builtins__ # <module 'builtins' (built-in)>
import lxml.html._difflib as difflib # C:\Programs\Python\Python313\Lib\site-packages\lxml\html\_difflib.cp313-win_amd64.pyd
import inspect as inspect # C:\Programs\Python\Python313\Lib\inspect.py
import itertools as itertools # <module 'itertools' (built-in)>
import functools as functools # C:\Programs\Python\Python313\Lib\functools.py
import operator as operator # C:\Programs\Python\Python313\Lib\operator.py
import re as re # C:\Programs\Python\Python313\Lib\re\__init__.py
import lxml.etree as etree # C:\Programs\Python\Python313\Lib\site-packages\lxml\etree.cp313-win_amd64.pyd
import lxml.html.defs as defs # C:\Programs\Python\Python313\Lib\site-packages\lxml\html\defs.py
import lxml.html._difflib as __lxml_html__difflib


# functions

def cleanup_delete(*args, **kwargs): # real signature unknown
    """
    Cleans up any DEL_START/DEL_END markers in the document, replacing
        them with <del></del>.  To do this while keeping the document
        valid, it may need to drop some tags (either start or end tags).
    
        It may also move the del into adjacent tags to try to move it to a
        similar location where it was originally located (e.g., moving a
        delete into preceding <div> tag, if the del looks like (DEL_START,
        'Text</div>', DEL_END)
    """
    pass

def cleanup_html(*args, **kwargs): # real signature unknown
    """
    This 'cleans' the HTML, meaning that any page structure is removed
        (only the contents of <body> are used, if there is any <body).
        Also <ins> and <del> tags are removed.
    """
    pass

def compress_tokens(*args, **kwargs): # real signature unknown
    """
    Combine adjacent tokens when there is no HTML between the tokens,
        and they share an annotation
    """
    pass

def copy_annotations(*args, **kwargs): # real signature unknown
    """ Copy annotations from the tokens listed in src to the tokens in dest """
    pass

def default_markup(*args, **kwargs): # real signature unknown
    pass

def end_tag(*args, **kwargs): # real signature unknown
    """
    The text representation of an end tag for a tag.  Includes
        trailing whitespace when appropriate.
    """
    pass

def expand_tokens(*args, **kwargs): # real signature unknown
    """
    Given a list of tokens, return a generator of the chunks of
        text for the data in the tokens.
    """
    pass

def fixup_chunks(*args, **kwargs): # real signature unknown
    """ This function takes a list of chunks and produces a list of tokens. """
    pass

def fixup_ins_del_tags(*args, **kwargs): # real signature unknown
    """
    Given an html string, move any <ins> or <del> tags inside of any
        block-level elements, e.g. transform <ins><p>word</p></ins> to
        <p><ins>word</ins></p>
    """
    pass

def flatten_el(*args, **kwargs): # real signature unknown
    """
    Takes an lxml element el, and generates all the text chunks for
        that tag.  Each start tag is a chunk, each word is a chunk, and each
        end tag is a chunk.
    
        If skip_tag is true, then the outermost container tag is
        not returned (just its contents).
    """
    pass

def fragment_fromstring(html, create_parent=False, base_url=None, parser=None, **kw): # reliably restored by inspect
    """
    Parses a single HTML element; it is an error if there is more than
    one element, or if anything but whitespace precedes or follows the
    element.
    
    If ``create_parent`` is true (or is a tag name) then a parent node
    will be created to encapsulate the HTML in a single element.  In this
    case, leading or trailing text is also allowed, as are multiple elements
    as result of the parsing.
    
    Passing a ``base_url`` will set the document's ``base_url`` attribute
    (and the tree's docinfo.URL).
    """
    pass

def group_by_first_item(*args, **kwargs): # real signature unknown
    """
    Create a new function with partial application of the given arguments
    and keywords.
    """
    pass

def htmldiff(*args, **kwargs): # real signature unknown
    """
    Do a diff of the old and new document.  The documents are HTML
        *fragments* (str/UTF8 or unicode), they are not complete documents
        (i.e., no <html> tag).
    
        Returns HTML with <ins> and <del> tags added around the
        appropriate text.
    
        Markup is generally ignored, with the markup from new_html
        preserved, and possibly some markup from old_html (though it is
        considered acceptable to lose some of the old markup).  Only the
        words in the HTML are diffed.  The exception is <img> tags, which
        are treated like words, and the href attribute of <a> tags, which
        are noted inside the tag itself when there are changes.
    """
    pass

def htmldiff_tokens(*args, **kwargs): # real signature unknown
    """
    Does a diff on the tokens themselves, returning a list of text
        chunks (not tokens).
    """
    pass

def html_annotate(*args, **kwargs): # real signature unknown; NOTE: unreliably restored from __doc__ 
    """
    doclist should be ordered from oldest to newest, like::
    
            >>> version1 = 'Hello World'
            >>> version2 = 'Goodbye World'
            >>> print(html_annotate([(version1, 'version 1'),
            ...                      (version2, 'version 2')]))
            <span title="version 2">Goodbye</span> <span title="version 1">World</span>
    
        The documents must be *fragments* (str/UTF8 or unicode), not
        complete documents
    
        The markup argument is a function to markup the spans of words.
        This function is called like markup('Hello', 'version 2'), and
        returns HTML.  The first argument is text and never includes any
        markup.  The default uses a span with a title:
    
            >>> print(default_markup('Some Text', 'by Joe'))
            <span title="by Joe">Some Text</span>
    """
    pass

def html_annotate_merge_annotations(*args, **kwargs): # real signature unknown
    """
    Merge the annotations from tokens_old into tokens_new, when the
        tokens in the new document already existed in the old document.
    """
    pass

def is_end_tag(*args, **kwargs): # real signature unknown
    pass

def is_start_tag(*args, **kwargs): # real signature unknown
    pass

def is_word(*args, **kwargs): # real signature unknown
    pass

def markup_serialize_tokens(*args, **kwargs): # real signature unknown
    """
    Serialize the list of tokens into a list of text chunks, calling
        markup_func around text to add annotations.
    """
    pass

def merge_delete(*args, **kwargs): # real signature unknown
    """
    Adds the text chunks in del_chunks to the document doc (another
        list of text chunks) with marker to show it is a delete.
        cleanup_delete later resolves these markers into <del> tags.
    """
    pass

def merge_insert(*args, **kwargs): # real signature unknown
    """
    doc is the already-handled document (as a list of text chunks);
        here we add <ins>ins_chunks</ins> to the end of that.
    """
    pass

def operator(*args, **kwargs): # real signature unknown
    """
    Operator interface.
    
    This module exports a set of functions implemented in C corresponding
    to the intrinsic operators of Python.  For example, operator.add(x, y)
    is equivalent to the expression x+y.  The function names are those
    used for special methods; variants without leading and trailing
    '__' are also provided for convenience.
    """
    pass

def parse_html(*args, **kwargs): # real signature unknown
    """
    Parses an HTML fragment, returning an lxml element.  Note that the HTML will be
        wrapped in a <div> tag that was not in the original document.
    
        If cleanup is true, make sure there's no <head> or <body>, and get
        rid of any <ins> and <del> tags.
    """
    pass

def serialize_html_fragment(*args, **kwargs): # real signature unknown
    """
    Serialize a single lxml element as HTML.  The serialized form
        includes the elements tail.
    
        If skip_outer is true, then don't serialize the outermost tag
    """
    pass

def split_trailing_whitespace(*args, **kwargs): # real signature unknown
    """
    This function takes a word, such as 'test
    
    ' and returns ('test','
    
    ')
    """
    pass

def split_words(*args, **kwargs): # real signature unknown
    """
    Splits some text into words. Includes trailing whitespace
        on each word when appropriate.
    """
    pass

def start_tag(*args, **kwargs): # real signature unknown
    """ The text representation of the start tag for a tag. """
    pass

def tokenize(*args, **kwargs): # real signature unknown
    """
    Parse the given HTML and returns token objects (words with attached tags).
    
        This parses only the content of a page; anything in the head is
        ignored, and the <head> and <body> elements are themselves
        optional.  The content is then parsed by lxml, which ensures the
        validity of the resulting parsed document (though lxml may make
        incorrect guesses when the markup is particular bad).
    
        <ins> and <del> tags are also eliminated from the document, as
        that gets confusing.
    
        If include_hrefs is true, then the href attribute of <a> tags is
        included as a special kind of diffable token.
    """
    pass

def tokenize_annotated(*args, **kwargs): # real signature unknown
    """ Tokenize a document and add an annotation attribute to each token """
    pass

def _find_words(*args, **kwargs): # real signature unknown
    """ Return a list of all non-overlapping matches of pattern in string. """
    pass

def _has_start_whitespace(*args, **kwargs): # real signature unknown
    pass

def _merge_element_contents(*args, **kwargs): # real signature unknown
    """
    Removes an element, but merges its contents into its place, e.g.,
        given <p>Hi <i>there!</i></p>, if you remove the <i> element you get
        <p>Hi there!</p>
    """
    pass

def _replace_ins_del(*args, **kwargs): # real signature unknown
    pass

def _search_body(*args, **kwargs): # real signature unknown
    pass

def _search_end_body(*args, **kwargs): # real signature unknown
    pass

def __pyx_unpickle_InsensitiveSequenceMatcher(*args, **kwargs): # real signature unknown
    pass

# classes

class DEL_END(object):
    # no doc
    def __init__(self, *args, **kwargs): # real signature unknown
        pass

    __weakref__ = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """list of weak references to the object"""


    __dict__ = None # (!) real value is "mappingproxy({'__module__': 'lxml.html.diff', '__dict__': <attribute '__dict__' of 'DEL_END' objects>, '__weakref__': <attribute '__weakref__' of 'DEL_END' objects>, '__doc__': None})"


class DEL_START(object):
    # no doc
    def __init__(self, *args, **kwargs): # real signature unknown
        pass

    __weakref__ = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """list of weak references to the object"""


    __dict__ = None # (!) real value is "mappingproxy({'__module__': 'lxml.html.diff', '__dict__': <attribute '__dict__' of 'DEL_START' objects>, '__weakref__': <attribute '__weakref__' of 'DEL_START' objects>, '__doc__': None})"


class token(str):
    """
    Represents a diffable token, generally a word that is displayed to
        the user.  Opening tags are attached to this token when they are
        adjacent (pre_tags) and closing tags that follow the word
        (post_tags).  Some exceptions occur when there are empty tags
        adjacent to a word, so there may be close tags in pre_tags, or
        open tags in post_tags.
    
        We also keep track of whether the word was originally followed by
        whitespace, even though we do not want to treat the word as
        equivalent to a similar word that does not have a trailing
        space.
    """
    def html(self, *args, **kwargs): # real signature unknown
        pass

    def __init__(self, *args, **kwargs): # real signature unknown
        pass

    @staticmethod # known case of __new__
    def __new__(*args, **kwargs): # real signature unknown
        pass

    def __repr__(self, *args, **kwargs): # real signature unknown
        pass

    __weakref__ = property(lambda self: object(), lambda self, v: None, lambda self: None)  # default
    """list of weak references to the object"""


    hide_when_equal = False
    __dict__ = None # (!) real value is "mappingproxy({'__module__': 'lxml.html.diff', '__doc__': ' Represents a diffable token, generally a word that is displayed to\\n    the user.  Opening tags are attached to this token when they are\\n    adjacent (pre_tags) and closing tags that follow the word\\n    (post_tags).  Some exceptions occur when there are empty tags\\n    adjacent to a word, so there may be close tags in pre_tags, or\\n    open tags in post_tags.\\n\\n    We also keep track of whether the word was originally followed by\\n    whitespace, even though we do not want to treat the word as\\n    equivalent to a similar word that does not have a trailing\\n    space.', 'hide_when_equal': False, '__new__': <staticmethod(<cyfunction token.__new__ at 0x000001C946697700>)>, '__repr__': <cyfunction token.__repr__ at 0x000001C9466977C0>, 'html': <cyfunction token.html at 0x000001C946697880>, '__dict__': <attribute '__dict__' of 'token' objects>, '__weakref__': <attribute '__weakref__' of 'token' objects>})"


class href_token(token):
    """
    Represents the href in an anchor tag.  Unlike other words, we only
        show the href when it changes.
    """
    def html(self, *args, **kwargs): # real signature unknown
        pass

    def __init__(self, *args, **kwargs): # real signature unknown
        pass

    hide_when_equal = True


class InsensitiveSequenceMatcher(__lxml_html__difflib.SequenceMatcher):
    """
    Acts like SequenceMatcher, but tries not to find very small equal
        blocks amidst large spans of changes
    """
    def __init__(self, *args, **kwargs): # real signature unknown
        """
        Construct a SequenceMatcher.
        
                Optional arg isjunk is None (the default), or a one-argument
                function that takes a sequence element and returns true iff the
                element is junk.  None is equivalent to passing "lambda x: 0", i.e.
                no elements are considered to be junk.  For example, pass
                    lambda x: x in " \t"
                if you're comparing lines as sequences of characters, and don't
                want to synch up on blanks or hard tabs.
        
                Optional arg a is the first of two sequences to be compared.  By
                default, an empty string.  The elements of a must be hashable.  See
                also .set_seqs() and .set_seq1().
        
                Optional arg b is the second of two sequences to be compared.  By
                default, an empty string.  The elements of b must be hashable. See
                also .set_seqs() and .set_seq2().
        
                Optional arg autojunk should be set to False to disable the
                "automatic junk heuristic" that treats popular elements as junk
                (see module documentation for more information).
        """
        pass

    @staticmethod # known case of __new__
    def __new__(*args, **kwargs): # real signature unknown
        """ Create and return a new object.  See help(type) for accurate signature. """
        pass

    def __reduce_cython__(self, *args, **kwargs): # real signature unknown
        pass

    def __reduce__(self, *args, **kwargs): # real signature unknown
        pass

    def __setstate_cython__(self, *args, **kwargs): # real signature unknown
        pass

    def __setstate__(self, *args, **kwargs): # real signature unknown
        pass

    threshold = 2
    __pyx_vtable__ = None # (!) real value is '<capsule object NULL at 0x000001C946666700>'


class tag_token(token):
    """
    Represents a token that is actually a tag.  Currently this is just
        the <img> tag, which takes up visible space just like a word but
        is only represented in a document by a tag.
    """
    def html(self, *args, **kwargs): # real signature unknown
        pass

    def __init__(self, *args, **kwargs): # real signature unknown
        pass

    @staticmethod # known case of __new__
    def __new__(*args, **kwargs): # real signature unknown
        pass

    def __repr__(self, *args, **kwargs): # real signature unknown
        pass


# variables with complex values

__all__ = [
    'html_annotate',
    'htmldiff',
]

__loader__ = None # (!) real value is '<_frozen_importlib_external.ExtensionFileLoader object at 0x000001C944CC2B50>'

__spec__ = None # (!) real value is "ModuleSpec(name='lxml.html.diff', loader=<_frozen_importlib_external.ExtensionFileLoader object at 0x000001C944CC2B50>, origin='C:\\\\Programs\\\\Python\\\\Python313\\\\Lib\\\\site-packages\\\\lxml\\\\html\\\\diff.cp313-win_amd64.pyd')"

__test__ = {
    'html_annotate (line 73)': '\n    doclist should be ordered from oldest to newest, like::\n\n        >>> version1 = \'Hello World\'\n        >>> version2 = \'Goodbye World\'\n        >>> print(html_annotate([(version1, \'version 1\'),\n        ...                      (version2, \'version 2\')]))\n        <span title="version 2">Goodbye</span> <span title="version 1">World</span>\n\n    The documents must be *fragments* (str/UTF8 or unicode), not\n    complete documents\n\n    The markup argument is a function to markup the spans of words.\n    This function is called like markup(\'Hello\', \'version 2\'), and\n    returns HTML.  The first argument is text and never includes any\n    markup.  The default uses a span with a title:\n\n        >>> print(default_markup(\'Some Text\', \'by Joe\'))\n        <span title="by Joe">Some Text</span>\n    ',
}

