forked from typeddjango/django-stubs
/
xml_serializer.pyi
60 lines (52 loc) · 2.27 KB
/
xml_serializer.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
from django.core.serializers import base as base
from typing import Any
from xml.sax.expatreader import ExpatParser as _ExpatParser
class Serializer(base.Serializer):
def indent(self, level: Any) -> None: ...
xml: Any = ...
def start_serialization(self) -> None: ...
def end_serialization(self) -> None: ...
def start_object(self, obj: Any) -> None: ...
def end_object(self, obj: Any) -> None: ...
def handle_field(self, obj: Any, field: Any) -> None: ...
def handle_fk_field(self, obj: Any, field: Any) -> None: ...
def handle_m2m_field(self, obj: Any, field: Any) -> None: ...
class Deserializer(base.Deserializer):
handle_forward_references: Any = ...
event_stream: Any = ...
db: Any = ...
ignore: Any = ...
def __init__(
self, stream_or_string: Any, *, using: Any = ..., ignorenonexistent: bool = ..., **options: Any
) -> None: ...
def __next__(self): ...
def getInnerText(node: Any): ...
class DefusedExpatParser(_ExpatParser):
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def start_doctype_decl(self, name: Any, sysid: Any, pubid: Any, has_internal_subset: Any) -> None: ...
def entity_decl(
self, name: Any, is_parameter_entity: Any, value: Any, base: Any, sysid: Any, pubid: Any, notation_name: Any
) -> None: ...
def unparsed_entity_decl(self, name: Any, base: Any, sysid: Any, pubid: Any, notation_name: Any) -> None: ...
def external_entity_ref_handler(self, context: Any, base: Any, sysid: Any, pubid: Any) -> None: ...
def reset(self) -> None: ...
class DefusedXmlException(ValueError): ...
class DTDForbidden(DefusedXmlException):
name: Any = ...
sysid: Any = ...
pubid: Any = ...
def __init__(self, name: Any, sysid: Any, pubid: Any) -> None: ...
class EntitiesForbidden(DefusedXmlException):
name: Any = ...
value: Any = ...
base: Any = ...
sysid: Any = ...
pubid: Any = ...
notation_name: Any = ...
def __init__(self, name: Any, value: Any, base: Any, sysid: Any, pubid: Any, notation_name: Any) -> None: ...
class ExternalReferenceForbidden(DefusedXmlException):
context: Any = ...
base: Any = ...
sysid: Any = ...
pubid: Any = ...
def __init__(self, context: Any, base: Any, sysid: Any, pubid: Any) -> None: ...