PyFunceble/helpers.py
def to_yaml(self, destination, flow_style=False):
        """
        Save a dictionnary into a YAML file.

        :param destination:
            A path to a file where we're going to write the
            converted dict into a JSON format.
        :type destination: str
        """

        with open(destination, "w") as file:
            # We open the file we are going to write.
            # Note: We always overwrite the destination.

            # We save the current dictionnary into a json format.
            dump_yaml(
                self.main_dictionnary,
                file,
                encoding="utf-8",
                allow_unicode=True,
                indent=4,
                default_flow_style=flow_style,
            )
def to_yaml(self, destination, flow_style=False):
        """
        Save a dictionnary into a YAML file.

        :param destination:
            A path to a file where we're going to write the
            converted dict into a JSON format.
        :type destination: str
        """

        with open(destination, "w") as file:
            # We open the file we are going to write.
            # Note: We always overwrite the destination.

            # We save the current dictionnary into a json format.
            dump_yaml(
                self.main_dictionnary,
                file,
                encoding="utf-8",
                allow_unicode=True,
                indent=4,
                default_flow_style=flow_style,
            )
def to_yaml ( self , destination , flow_style = False ) : with open ( destination , "w" ) as file : # We open the file we are going to write. # Note: We always overwrite the destination. # We save the current dictionnary into a json format. dump_yaml ( self . main_dictionnary , file , encoding = "utf-8" , allow_unicode = True , indent = 4 , default_flow_style = flow_style , )
Save a dictionnary into a YAML file.

        :param destination:
            A path to a file where we're going to write the
            converted dict into a JSON format.
        :type destination: str
Save a dictionnary into a YAML file .