Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/yaml/loader.py: 36%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
2__all__ = ['BaseLoader', 'FullLoader', 'SafeLoader', 'Loader', 'UnsafeLoader']
4from .reader import *
5from .scanner import *
6from .parser import *
7from .composer import *
8from .constructor import *
9from .resolver import *
11class BaseLoader(Reader, Scanner, Parser, Composer, BaseConstructor, BaseResolver):
13 def __init__(self, stream):
14 Reader.__init__(self, stream)
15 Scanner.__init__(self)
16 Parser.__init__(self)
17 Composer.__init__(self)
18 BaseConstructor.__init__(self)
19 BaseResolver.__init__(self)
21class FullLoader(Reader, Scanner, Parser, Composer, FullConstructor, Resolver):
23 def __init__(self, stream):
24 Reader.__init__(self, stream)
25 Scanner.__init__(self)
26 Parser.__init__(self)
27 Composer.__init__(self)
28 FullConstructor.__init__(self)
29 Resolver.__init__(self)
31class SafeLoader(Reader, Scanner, Parser, Composer, SafeConstructor, Resolver):
33 def __init__(self, stream):
34 Reader.__init__(self, stream)
35 Scanner.__init__(self)
36 Parser.__init__(self)
37 Composer.__init__(self)
38 SafeConstructor.__init__(self)
39 Resolver.__init__(self)
41class Loader(Reader, Scanner, Parser, Composer, Constructor, Resolver):
43 def __init__(self, stream):
44 Reader.__init__(self, stream)
45 Scanner.__init__(self)
46 Parser.__init__(self)
47 Composer.__init__(self)
48 Constructor.__init__(self)
49 Resolver.__init__(self)
51# UnsafeLoader is the same as Loader (which is and was always unsafe on
52# untrusted input). Use of either Loader or UnsafeLoader should be rare, since
53# FullLoad should be able to load almost all YAML safely. Loader is left intact
54# to ensure backwards compatibility.
55class UnsafeLoader(Reader, Scanner, Parser, Composer, Constructor, Resolver):
57 def __init__(self, stream):
58 Reader.__init__(self, stream)
59 Scanner.__init__(self)
60 Parser.__init__(self)
61 Composer.__init__(self)
62 Constructor.__init__(self)
63 Resolver.__init__(self)