comparison configmix/yaml.py @ 56:1f11672c4615

Optimize the documentation: make references working with Sphinx using :role:`target`
author Franz Glasner <hg@dom66.de>
date Wed, 28 Feb 2018 00:36:11 +0100
parents aa8345dae995
children a43749f751e0
comparison
equal deleted inserted replaced
55:51a8fa011659 56:1f11672c4615
26 __all__ = ["safe_load", "safe_load_all", "load", "load_all"] 26 __all__ = ["safe_load", "safe_load_all", "load", "load_all"]
27 27
28 28
29 class ConfigLoader(yaml.Loader): 29 class ConfigLoader(yaml.Loader):
30 30
31 """A YAML loader, which makes all !!str strings to Unicode. Standard 31 """A YAML loader, which makes all ``!!str`` strings to Unicode.
32 PyYAML does this only in the non-ASCII case. 32 Standard PyYAML does this only in the non-ASCII case.
33 33
34 If an `OrderedDict` implementation is available then all "map" and 34 If an `OrderedDict` implementation is available then all "map" and
35 "omap" nodes are constructed as `OrderedDict`. 35 "omap" nodes are constructed as `OrderedDict`.
36 This is against YAML specs but within configuration files it seems 36 This is against YAML specs but within configuration files it seems
37 more natural. 37 more natural.
88 ConfigLoader.construct_yaml_map) 88 ConfigLoader.construct_yaml_map)
89 89
90 90
91 class ConfigSafeLoader(yaml.SafeLoader): 91 class ConfigSafeLoader(yaml.SafeLoader):
92 92
93 """A safe YAML loader, which makes all !!str strings to Unicode. 93 """A safe YAML loader, which makes all ``!!str`` strings to Unicode.
94 Standard PyYAML does this only in the non-ASCII case. 94 Standard PyYAML does this only in the non-ASCII case.
95 95
96 If an `OrderedDict` implementation is available then all "map" and 96 If an `OrderedDict` implementation is available then all "map" and
97 "omap" nodes are constructed as `OrderedDict`. 97 "omap" nodes are constructed as `OrderedDict`.
98 This is against YAML specs but within configuration files it seems 98 This is against YAML specs but within configuration files it seems