Esempio n. 1
0
 def __init__(self, stream):
     Reader.__init__(self, stream)
     Scanner.__init__(self)
     Parser.__init__(self)
     Composer.__init__(self)
     SafeConstructor.__init__(self)
     Resolver.__init__(self)
Esempio n. 2
0
 def __init__(self, stream):
     Reader.__init__(self, stream)
     Scanner.__init__(self)
     Parser.__init__(self)
     Composer.__init__(self)
     SafeConstructor.__init__(self)
     Resolver.__init__(self)
Esempio n. 3
0
 def __init__(self, stream, filename):
     Reader.__init__(self, stream)
     Scanner.__init__(self)
     if cyaml:
         Parser.__init__(self, stream)
     else:
         Parser.__init__(self)
     Composer.__init__(self)
     SafeConstructor.__init__(self)
     Resolver.__init__(self)
     NodeConstructor.__init__(self, filename)
Esempio n. 4
0
    def __init__(self, stream):
        Reader.__init__(self, stream)
        Scanner12.__init__(self)
        Parser.__init__(self)
        Composer.__init__(self)

# PKM2014 - uses SafeConstructor instead of Constructor. This should make no
# difference, because "Is it YAML?" only gets as far as the composition stage,
# but - well: it reduces the risk of something bad happening.

#        Constructor.__init__(self)
        SafeConstructor.__init__(self)
        Resolver.__init__(self)
Esempio n. 5
0
    def __init__(self):
        self.add_multi_constructor("!vol/", self.__class__.vol_constructor)
        self.add_multi_constructor("!type/", self.__class__.type_constructor)
        self.add_constructor(
            "!include", self.__class__.include_file_constructor)
        self.add_constructor(
            "!include_merge", self.__class__.include_merge_constructor)
        self.add_constructor(
            "!include_dir_file_mapped",
            self.__class__.include_dir_file_mapped_constructor)
        self.add_constructor("!env_var", self.__class__.env_var_constructor)
        self.add_constructor("!path", self.__class__.path_constructor)

        SafeConstructor.__init__(self)
Esempio n. 6
0
    def __init__(self, stream):
        """Initialise Loader."""

        try:
            self._root = os.path.split(stream.name)[0]
        except AttributeError:
            self._root = os.path.curdir

        Reader.__init__(self, stream)
        Scanner.__init__(self)
        Parser.__init__(self)
        RememberComposer.__init__(self)
        SafeConstructor.__init__(self)
        Resolver.__init__(self)
Esempio n. 7
0
    def __init__(self):
        self.add_multi_constructor("!vol/", self.__class__.vol_constructor)
        self.add_multi_constructor("!type/", self.__class__.type_constructor)
        self.add_constructor("!include",
                             self.__class__.include_file_constructor)
        self.add_constructor("!include_merge",
                             self.__class__.include_merge_constructor)
        self.add_constructor(
            "!include_dir_file_mapped",
            self.__class__.include_dir_file_mapped_constructor)
        self.add_constructor("!env_var", self.__class__.env_var_constructor)
        self.add_constructor("!path", self.__class__.path_constructor)
        self.add_constructor("!listdir", self.__class__.listdir_constructor)

        SafeConstructor.__init__(self)
Esempio n. 8
0
    def __init__(self, stream):
        """Initialise Loader."""

        # pylint: disable=non-parent-init-called

        try:
            self._root = os.path.split(stream.name)[0]
        except AttributeError:
            self._root = os.path.curdir

        Reader.__init__(self, stream)
        Scanner.__init__(self)
        Parser.__init__(self)
        RememberComposer.__init__(self)
        SafeConstructor.__init__(self)
        Resolver.__init__(self)
        SourceMappingConstructor.__init__(self)
Esempio n. 9
0
    def __init__(self, stream, cfg_folder: str = None):
        self.cfg_folder = cfg_folder
        Reader.__init__(self, stream)
        Scanner.__init__(self)
        Parser.__init__(self)
        Composer.__init__(self)
        SafeConstructor.__init__(self)
        Resolver.__init__(self)

        self.add_constructor("!format",
                             self.__class__.format_string_constructor)
        self.add_constructor("!file", self.__class__.file_contructor)
        self.add_constructor("!include",
                             self.__class__.include_file_constructor)
        self.add_constructor("!include_merge",
                             self.__class__.include_merge_constructor)
        self.add_constructor(
            "!include_dir_file_mapped",
            self.__class__.include_dir_file_mapped_constructor)
        self.add_constructor("!env_var", self.__class__.env_var_constructor)
        self.add_constructor("!path", self.__class__.path_constructor)
        self.add_constructor("!listdir", self.__class__.listdir_constructor)
 def __init__(self, filename):
     SafeConstructor.__init__(self)
     self.filename = filename
Esempio n. 11
0
 def __init__(self, filename):
     SafeConstructor.__init__(self)
     self.filename = filename
Esempio n. 12
0
File: yaml.py Progetto: i386x/abcdoc
    def __init__(self, filename=None):
        """
        """

        SafeConstructor.__init__(self)
        self.__filename = filename