Add defaults for third-party stubs A-D (#9952)

This commit is contained in:
Alex Waygood
2023-03-27 16:49:58 +01:00
committed by GitHub
parent ce5f02fcdc
commit b9fedd20ce
186 changed files with 1829 additions and 1760 deletions
+21 -21
View File
@@ -37,13 +37,13 @@ class BeautifulSoup(Tag):
markup: str
def __init__(
self,
markup: str | bytes | SupportsRead[str] | SupportsRead[bytes] = ...,
features: str | Sequence[str] | None = ...,
builder: TreeBuilder | type[TreeBuilder] | None = ...,
parse_only: SoupStrainer | None = ...,
from_encoding: str | None = ...,
exclude_encodings: Sequence[str] | None = ...,
element_classes: dict[type[PageElement], type[Any]] | None = ...,
markup: str | bytes | SupportsRead[str] | SupportsRead[bytes] = "",
features: str | Sequence[str] | None = None,
builder: TreeBuilder | type[TreeBuilder] | None = None,
parse_only: SoupStrainer | None = None,
from_encoding: str | None = None,
exclude_encodings: Sequence[str] | None = None,
element_classes: dict[type[PageElement], type[Any]] | None = None,
**kwargs,
) -> None: ...
def __copy__(self) -> Self: ...
@@ -58,35 +58,35 @@ class BeautifulSoup(Tag):
def new_tag(
self,
name,
namespace: Incomplete | None = ...,
nsprefix: Incomplete | None = ...,
attrs=...,
sourceline: Incomplete | None = ...,
sourcepos: Incomplete | None = ...,
namespace: Incomplete | None = None,
nsprefix: Incomplete | None = None,
attrs={},
sourceline: Incomplete | None = None,
sourcepos: Incomplete | None = None,
**kwattrs,
) -> Tag: ...
def string_container(self, base_class: Incomplete | None = ...): ...
def new_string(self, s, subclass: Incomplete | None = ...): ...
def string_container(self, base_class: Incomplete | None = None): ...
def new_string(self, s, subclass: Incomplete | None = None): ...
def insert_before(self, *args) -> None: ...
def insert_after(self, *args) -> None: ...
def popTag(self): ...
def pushTag(self, tag) -> None: ...
def endData(self, containerClass: Incomplete | None = ...) -> None: ...
def object_was_parsed(self, o, parent: Incomplete | None = ..., most_recent_element: Incomplete | None = ...) -> None: ...
def endData(self, containerClass: Incomplete | None = None) -> None: ...
def object_was_parsed(self, o, parent: Incomplete | None = None, most_recent_element: Incomplete | None = None) -> None: ...
def handle_starttag(
self,
name,
namespace,
nsprefix,
attrs,
sourceline: Incomplete | None = ...,
sourcepos: Incomplete | None = ...,
namespaces: dict[str, str] | None = ...,
sourceline: Incomplete | None = None,
sourcepos: Incomplete | None = None,
namespaces: dict[str, str] | None = None,
): ...
def handle_endtag(self, name, nsprefix: Incomplete | None = ...) -> None: ...
def handle_endtag(self, name, nsprefix: Incomplete | None = None) -> None: ...
def handle_data(self, data) -> None: ...
def decode( # type: ignore[override]
self, pretty_print: bool = ..., eventual_encoding: str = ..., formatter: str | Formatter = ...
self, pretty_print: bool = False, eventual_encoding: str = "utf-8", formatter: str | Formatter = "minimal"
): ... # missing some arguments
class BeautifulStoneSoup(BeautifulSoup): ...
@@ -35,9 +35,9 @@ class TreeBuilder:
def prepare_markup(
self,
markup,
user_specified_encoding: Incomplete | None = ...,
document_declared_encoding: Incomplete | None = ...,
exclude_encodings: Incomplete | None = ...,
user_specified_encoding: Incomplete | None = None,
document_declared_encoding: Incomplete | None = None,
exclude_encodings: Incomplete | None = None,
) -> None: ...
def test_fragment_to_document(self, fragment): ...
def set_up_substitutions(self, tag): ...
@@ -11,8 +11,8 @@ class BeautifulSoupHTMLParser(HTMLParser):
already_closed_empty_element: Any
def __init__(self, *args, **kwargs) -> None: ...
def handle_startendtag(self, name, attrs) -> None: ...
def handle_starttag(self, name, attrs, handle_empty_element: bool = ...) -> None: ...
def handle_endtag(self, name, check_already_closed: bool = ...) -> None: ...
def handle_starttag(self, name, attrs, handle_empty_element: bool = True) -> None: ...
def handle_endtag(self, name, check_already_closed: bool = True) -> None: ...
def handle_data(self, data) -> None: ...
def handle_charref(self, name) -> None: ...
def handle_entityref(self, name) -> None: ...
@@ -28,12 +28,12 @@ class HTMLParserTreeBuilder(HTMLTreeBuilder):
features: Any
TRACKS_LINE_NUMBERS: bool
parser_args: Any
def __init__(self, parser_args: Incomplete | None = ..., parser_kwargs: Incomplete | None = ..., **kwargs) -> None: ...
def __init__(self, parser_args: Incomplete | None = None, parser_kwargs: Incomplete | None = None, **kwargs) -> None: ...
def prepare_markup(
self,
markup,
user_specified_encoding: Incomplete | None = ...,
document_declared_encoding: Incomplete | None = ...,
exclude_encodings: Incomplete | None = ...,
user_specified_encoding: Incomplete | None = None,
document_declared_encoding: Incomplete | None = None,
exclude_encodings: Incomplete | None = None,
) -> None: ...
def feed(self, markup) -> None: ...
+5 -5
View File
@@ -19,18 +19,18 @@ class LXMLTreeBuilderForXML(TreeBuilder):
empty_element_tags: Any
soup: Any
nsmaps: Any
def __init__(self, parser: Incomplete | None = ..., empty_element_tags: Incomplete | None = ..., **kwargs) -> None: ...
def __init__(self, parser: Incomplete | None = None, empty_element_tags: Incomplete | None = None, **kwargs) -> None: ...
def prepare_markup( # type: ignore[override] # the order of the parameters is different
self,
markup,
user_specified_encoding: Incomplete | None = ...,
exclude_encodings: Incomplete | None = ...,
document_declared_encoding: Incomplete | None = ...,
user_specified_encoding: Incomplete | None = None,
exclude_encodings: Incomplete | None = None,
document_declared_encoding: Incomplete | None = None,
) -> None: ...
parser: Any
def feed(self, markup) -> None: ...
def close(self) -> None: ...
def start(self, name, attrs, nsmap=...) -> None: ...
def start(self, name, attrs, nsmap={}) -> None: ...
def end(self, name) -> None: ...
def pi(self, target, data) -> None: ...
def data(self, content) -> None: ...
+15 -15
View File
@@ -20,9 +20,9 @@ class EntitySubstitution:
@classmethod
def quoted_attribute_value(cls, value): ...
@classmethod
def substitute_xml(cls, value, make_quoted_attribute: bool = ...): ...
def substitute_xml(cls, value, make_quoted_attribute: bool = False): ...
@classmethod
def substitute_xml_containing_entities(cls, value, make_quoted_attribute: bool = ...): ...
def substitute_xml_containing_entities(cls, value, make_quoted_attribute: bool = False): ...
@classmethod
def substitute_html(cls, s): ...
@@ -38,18 +38,18 @@ class EncodingDetector:
def __init__(
self,
markup,
known_definite_encodings: Iterable[str] | None = ...,
is_html: bool = ...,
exclude_encodings: list[str] | None = ...,
user_encodings: list[str] | None = ...,
override_encodings: list[str] | None = ...,
known_definite_encodings: Iterable[str] | None = None,
is_html: bool = False,
exclude_encodings: list[str] | None = None,
user_encodings: list[str] | None = None,
override_encodings: list[str] | None = None,
) -> None: ...
@property
def encodings(self) -> Iterator[str]: ...
@classmethod
def strip_byte_order_mark(cls, data): ...
@classmethod
def find_declared_encoding(cls, markup, is_html: bool = ..., search_entire_document: bool = ...) -> str | None: ...
def find_declared_encoding(cls, markup, is_html: bool = False, search_entire_document: bool = False) -> str | None: ...
class UnicodeDammit:
CHARSET_ALIASES: dict[str, str]
@@ -66,12 +66,12 @@ class UnicodeDammit:
def __init__(
self,
markup,
known_definite_encodings: list[str] | None = ...,
smart_quotes_to: Literal["ascii", "xml", "html"] | None = ...,
is_html: bool = ...,
exclude_encodings: list[str] | None = ...,
user_encodings: list[str] | None = ...,
override_encodings: list[str] | None = ...,
known_definite_encodings: list[str] | None = [],
smart_quotes_to: Literal["ascii", "xml", "html"] | None = None,
is_html: bool = False,
exclude_encodings: list[str] | None = [],
user_encodings: list[str] | None = None,
override_encodings: list[str] | None = None,
) -> None: ...
@property
def declared_html_encoding(self) -> str | None: ...
@@ -83,4 +83,4 @@ class UnicodeDammit:
FIRST_MULTIBYTE_MARKER: int
LAST_MULTIBYTE_MARKER: int
@classmethod
def detwingle(cls, in_bytes: bytes, main_encoding: str = ..., embedded_encoding: str = ...) -> bytes: ...
def detwingle(cls, in_bytes: bytes, main_encoding: str = "utf8", embedded_encoding: str = "windows-1252") -> bytes: ...
+6 -6
View File
@@ -1,7 +1,7 @@
from html.parser import HTMLParser
def diagnose(data) -> None: ...
def lxml_trace(data, html: bool = ..., **kwargs) -> None: ...
def lxml_trace(data, html: bool = True, **kwargs) -> None: ...
class AnnouncingParser(HTMLParser):
def handle_starttag(self, name, attrs) -> None: ...
@@ -15,8 +15,8 @@ class AnnouncingParser(HTMLParser):
def handle_pi(self, data) -> None: ...
def htmlparser_trace(data) -> None: ...
def rword(length: int = ...): ...
def rsentence(length: int = ...): ...
def rdoc(num_elements: int = ...): ...
def benchmark_parsers(num_elements: int = ...) -> None: ...
def profile(num_elements: int = ..., parser: str = ...) -> None: ...
def rword(length: int = 5): ...
def rsentence(length: int = 4): ...
def rdoc(num_elements: int = 1000): ...
def benchmark_parsers(num_elements: int = 100000) -> None: ...
def profile(num_elements: int = 100000, parser: str = "lxml") -> None: ...
+96 -88
View File
@@ -14,7 +14,7 @@ whitespace_re: Pattern[str]
PYTHON_SPECIFIC_ENCODINGS: set[str]
class NamespacedAttribute(str):
def __new__(cls, prefix: str, name: str | None = ..., namespace: str | None = ...) -> Self: ...
def __new__(cls, prefix: str, name: str | None = None, namespace: str | None = None) -> Self: ...
class AttributeValueWithCharsetSubstitution(str): ...
@@ -41,11 +41,11 @@ class PageElement:
previous_sibling: PageElement | None
def setup(
self,
parent: Tag | None = ...,
previous_element: PageElement | None = ...,
next_element: PageElement | None = ...,
previous_sibling: PageElement | None = ...,
next_sibling: PageElement | None = ...,
parent: Tag | None = None,
previous_element: PageElement | None = None,
next_element: PageElement | None = None,
previous_sibling: PageElement | None = None,
next_sibling: PageElement | None = None,
) -> None: ...
def format_string(self, s: str, formatter: Formatter | str | None) -> str: ...
def formatter_for_name(self, formatter: Formatter | str | _EntitySubstitution): ...
@@ -53,7 +53,7 @@ class PageElement:
previousSibling: PageElement | None
@property
def stripped_strings(self) -> Iterator[str]: ...
def get_text(self, separator: str = ..., strip: bool = ..., types: tuple[type[NavigableString], ...] = ...) -> str: ...
def get_text(self, separator: str = "", strip: bool = False, types: tuple[type[NavigableString], ...] = ...) -> str: ...
getText = get_text
@property
def text(self) -> str: ...
@@ -63,7 +63,7 @@ class PageElement:
replace_with_children = unwrap
replaceWithChildren = unwrap
def wrap(self, wrap_inside: _PageElementT) -> _PageElementT: ...
def extract(self, _self_index: int | None = ...) -> Self: ...
def extract(self, _self_index: int | None = None) -> Self: ...
def insert(self, position: int, new_child: PageElement | str) -> None: ...
def append(self, tag: PageElement | str) -> None: ...
def extend(self, tags: Iterable[PageElement | str]) -> None: ...
@@ -71,87 +71,87 @@ class PageElement:
def insert_after(self, *args: PageElement | str) -> None: ...
def find_next(
self,
name: _Strainable | SoupStrainer | None = ...,
attrs: dict[str, _Strainable] | _Strainable = ...,
string: _Strainable | None = ...,
name: _Strainable | SoupStrainer | None = None,
attrs: dict[str, _Strainable] | _Strainable = {},
string: _Strainable | None = None,
**kwargs: _Strainable,
) -> Tag | NavigableString | None: ...
findNext = find_next
def find_all_next(
self,
name: _Strainable | SoupStrainer | None = ...,
attrs: dict[str, _Strainable] | _Strainable = ...,
string: _Strainable | None = ...,
limit: int | None = ...,
name: _Strainable | SoupStrainer | None = None,
attrs: dict[str, _Strainable] | _Strainable = {},
string: _Strainable | None = None,
limit: int | None = None,
**kwargs: _Strainable,
) -> ResultSet[PageElement]: ...
findAllNext = find_all_next
def find_next_sibling(
self,
name: _Strainable | SoupStrainer | None = ...,
attrs: dict[str, _Strainable] | _Strainable = ...,
string: _Strainable | None = ...,
name: _Strainable | SoupStrainer | None = None,
attrs: dict[str, _Strainable] | _Strainable = {},
string: _Strainable | None = None,
**kwargs: _Strainable,
) -> Tag | NavigableString | None: ...
findNextSibling = find_next_sibling
def find_next_siblings(
self,
name: _Strainable | SoupStrainer | None = ...,
attrs: dict[str, _Strainable] | _Strainable = ...,
string: _Strainable | None = ...,
limit: int | None = ...,
name: _Strainable | SoupStrainer | None = None,
attrs: dict[str, _Strainable] | _Strainable = {},
string: _Strainable | None = None,
limit: int | None = None,
**kwargs: _Strainable,
) -> ResultSet[PageElement]: ...
findNextSiblings = find_next_siblings
fetchNextSiblings = find_next_siblings
def find_previous(
self,
name: _Strainable | SoupStrainer | None = ...,
attrs: dict[str, _Strainable] | _Strainable = ...,
string: _Strainable | None = ...,
name: _Strainable | SoupStrainer | None = None,
attrs: dict[str, _Strainable] | _Strainable = {},
string: _Strainable | None = None,
**kwargs: _Strainable,
) -> Tag | NavigableString | None: ...
findPrevious = find_previous
def find_all_previous(
self,
name: _Strainable | SoupStrainer | None = ...,
attrs: dict[str, _Strainable] | _Strainable = ...,
string: _Strainable | None = ...,
limit: int | None = ...,
name: _Strainable | SoupStrainer | None = None,
attrs: dict[str, _Strainable] | _Strainable = {},
string: _Strainable | None = None,
limit: int | None = None,
**kwargs: _Strainable,
) -> ResultSet[PageElement]: ...
findAllPrevious = find_all_previous
fetchPrevious = find_all_previous
def find_previous_sibling(
self,
name: _Strainable | SoupStrainer | None = ...,
attrs: dict[str, _Strainable] | _Strainable = ...,
string: _Strainable | None = ...,
name: _Strainable | SoupStrainer | None = None,
attrs: dict[str, _Strainable] | _Strainable = {},
string: _Strainable | None = None,
**kwargs: _Strainable,
) -> Tag | NavigableString | None: ...
findPreviousSibling = find_previous_sibling
def find_previous_siblings(
self,
name: _Strainable | SoupStrainer | None = ...,
attrs: dict[str, _Strainable] | _Strainable = ...,
string: _Strainable | None = ...,
limit: int | None = ...,
name: _Strainable | SoupStrainer | None = None,
attrs: dict[str, _Strainable] | _Strainable = {},
string: _Strainable | None = None,
limit: int | None = None,
**kwargs: _Strainable,
) -> ResultSet[PageElement]: ...
findPreviousSiblings = find_previous_siblings
fetchPreviousSiblings = find_previous_siblings
def find_parent(
self,
name: _Strainable | SoupStrainer | None = ...,
attrs: dict[str, _Strainable] | _Strainable = ...,
name: _Strainable | SoupStrainer | None = None,
attrs: dict[str, _Strainable] | _Strainable = {},
**kwargs: _Strainable,
) -> Tag | None: ...
findParent = find_parent
def find_parents(
self,
name: _Strainable | SoupStrainer | None = ...,
attrs: dict[str, _Strainable] | _Strainable = ...,
limit: int | None = ...,
name: _Strainable | SoupStrainer | None = None,
attrs: dict[str, _Strainable] | _Strainable = {},
limit: int | None = None,
**kwargs: _Strainable,
) -> ResultSet[Tag]: ...
findParents = find_parents
@@ -185,7 +185,7 @@ class NavigableString(str, PageElement):
def __new__(cls, value: str | bytes) -> Self: ...
def __copy__(self) -> Self: ...
def __getnewargs__(self) -> tuple[str]: ...
def output_ready(self, formatter: Formatter | str | None = ...) -> str: ...
def output_ready(self, formatter: Formatter | str | None = "minimal") -> str: ...
@property
def name(self) -> None: ...
@property
@@ -194,7 +194,7 @@ class NavigableString(str, PageElement):
class PreformattedString(NavigableString):
PREFIX: str
SUFFIX: str
def output_ready(self, formatter: Formatter | str | None = ...) -> str: ...
def output_ready(self, formatter: Formatter | str | None = None) -> str: ...
class CData(PreformattedString):
PREFIX: str
@@ -242,22 +242,22 @@ class Tag(PageElement):
preserve_whitespace_tags: list[str] | None
def __init__(
self,
parser: BeautifulSoup | None = ...,
builder: TreeBuilder | None = ...,
name: str | None = ...,
namespace: str | None = ...,
prefix: str | None = ...,
attrs: dict[str, str] | None = ...,
parent: Tag | None = ...,
previous: PageElement | None = ...,
is_xml: bool | None = ...,
sourceline: int | None = ...,
sourcepos: int | None = ...,
can_be_empty_element: bool | None = ...,
cdata_list_attributes: list[str] | None = ...,
preserve_whitespace_tags: list[str] | None = ...,
interesting_string_types: type[NavigableString] | tuple[type[NavigableString], ...] | None = ...,
namespaces: dict[str, str] | None = ...,
parser: BeautifulSoup | None = None,
builder: TreeBuilder | None = None,
name: str | None = None,
namespace: str | None = None,
prefix: str | None = None,
attrs: dict[str, str] | None = None,
parent: Tag | None = None,
previous: PageElement | None = None,
is_xml: bool | None = None,
sourceline: int | None = None,
sourcepos: int | None = None,
can_be_empty_element: bool | None = None,
cdata_list_attributes: list[str] | None = None,
preserve_whitespace_tags: list[str] | None = None,
interesting_string_types: type[NavigableString] | tuple[type[NavigableString], ...] | None = None,
namespaces: dict[str, str] | None = None,
) -> None: ...
parserClass: type[BeautifulSoup] | None
def __copy__(self) -> Self: ...
@@ -273,11 +273,11 @@ class Tag(PageElement):
@property
def strings(self) -> Iterable[str]: ...
def decompose(self) -> None: ...
def clear(self, decompose: bool = ...) -> None: ...
def clear(self, decompose: bool = False) -> None: ...
def smooth(self) -> None: ...
def index(self, element: PageElement) -> int: ...
def get(self, key: str, default: str | list[str] | None = ...) -> str | list[str] | None: ...
def get_attribute_list(self, key: str, default: str | list[str] | None = ...) -> list[str]: ...
def get(self, key: str, default: str | list[str] | None = None) -> str | list[str] | None: ...
def get_attribute_list(self, key: str, default: str | list[str] | None = None) -> list[str]: ...
def has_attr(self, key: str) -> bool: ...
def __hash__(self) -> int: ...
def __getitem__(self, key: str) -> str | list[str]: ...
@@ -292,34 +292,42 @@ class Tag(PageElement):
def __ne__(self, other: object) -> bool: ...
def __unicode__(self) -> str: ...
def encode(
self, encoding: str = ..., indent_level: int | None = ..., formatter: str | Formatter = ..., errors: str = ...
self,
encoding: str = "utf-8",
indent_level: int | None = None,
formatter: str | Formatter = "minimal",
errors: str = "xmlcharrefreplace",
) -> bytes: ...
def decode(self, indent_level: int | None = ..., eventual_encoding: str = ..., formatter: str | Formatter = ...) -> str: ...
@overload
def prettify(self, encoding: str, formatter: str | Formatter = ...) -> bytes: ...
@overload
def prettify(self, encoding: None = ..., formatter: str | Formatter = ...) -> str: ...
def decode_contents(
self, indent_level: int | None = ..., eventual_encoding: str = ..., formatter: str | Formatter = ...
def decode(
self, indent_level: int | None = None, eventual_encoding: str = "utf-8", formatter: str | Formatter = "minimal"
) -> str: ...
def encode_contents(self, indent_level: int | None = ..., encoding: str = ..., formatter: str | Formatter = ...) -> bytes: ...
def renderContents(self, encoding: str = ..., prettyPrint: bool = ..., indentLevel: int = ...) -> bytes: ...
@overload
def prettify(self, encoding: str, formatter: str | Formatter = "minimal") -> bytes: ...
@overload
def prettify(self, encoding: None = None, formatter: str | Formatter = "minimal") -> str: ...
def decode_contents(
self, indent_level: int | None = None, eventual_encoding: str = "utf-8", formatter: str | Formatter = "minimal"
) -> str: ...
def encode_contents(
self, indent_level: int | None = None, encoding: str = "utf-8", formatter: str | Formatter = "minimal"
) -> bytes: ...
def renderContents(self, encoding: str = "utf-8", prettyPrint: bool = False, indentLevel: int = 0) -> bytes: ...
def find(
self,
name: _Strainable | None = ...,
attrs: dict[str, _Strainable] | _Strainable = ...,
recursive: bool = ...,
string: _Strainable | None = ...,
name: _Strainable | None = None,
attrs: dict[str, _Strainable] | _Strainable = {},
recursive: bool = True,
string: _Strainable | None = None,
**kwargs: _Strainable,
) -> Tag | NavigableString | None: ...
findChild = find
def find_all(
self,
name: _Strainable | None = ...,
attrs: dict[str, _Strainable] | _Strainable = ...,
recursive: bool = ...,
string: _Strainable | None = ...,
limit: int | None = ...,
name: _Strainable | None = None,
attrs: dict[str, _Strainable] | _Strainable = {},
recursive: bool = True,
string: _Strainable | None = None,
limit: int | None = None,
**kwargs: _Strainable,
) -> ResultSet[Any]: ...
__call__ = find_all
@@ -330,13 +338,13 @@ class Tag(PageElement):
@property
def descendants(self) -> Iterable[PageElement]: ...
def select_one(
self, selector: str, namespaces: Incomplete | None = ..., *, flags: int = ..., custom: dict[str, str] | None = ...
self, selector: str, namespaces: Incomplete | None = None, *, flags: int = ..., custom: dict[str, str] | None = ...
) -> Tag | None: ...
def select(
self,
selector: str,
namespaces: Incomplete | None = ...,
limit: int | None = ...,
namespaces: Incomplete | None = None,
limit: int | None = None,
*,
flags: int = ...,
custom: dict[str, str] | None = ...,
@@ -351,12 +359,12 @@ class SoupStrainer:
string: _NormalizedStrainable
def __init__(
self,
name: _Strainable | None = ...,
attrs: dict[str, _Strainable] | _Strainable = ...,
string: _Strainable | None = ...,
name: _Strainable | None = None,
attrs: dict[str, _Strainable] | _Strainable = {},
string: _Strainable | None = None,
**kwargs: _Strainable,
) -> None: ...
def search_tag(self, markup_name: Tag | str | None = ..., markup_attrs=...): ...
def search_tag(self, markup_name: Tag | str | None = None, markup_attrs={}): ...
searchTag = search_tag
def search(self, markup: PageElement | Iterable[PageElement]): ...
+6 -6
View File
@@ -16,12 +16,12 @@ class Formatter(EntitySubstitution):
empty_attributes_are_booleans: bool
def __init__(
self,
language: str | None = ...,
entity_substitution: _EntitySubstitution | None = ...,
void_element_close_prefix: str = ...,
cdata_containing_tags: list[str] | None = ...,
empty_attributes_are_booleans: bool = ...,
indent: int = ...,
language: str | None = None,
entity_substitution: _EntitySubstitution | None = None,
void_element_close_prefix: str = "/",
cdata_containing_tags: list[str] | None = None,
empty_attributes_are_booleans: bool = False,
indent: int = 1,
) -> None: ...
def substitute(self, ns: str) -> str: ...
def attribute_value(self, value: str) -> str: ...