box/box_list.py
def from_yaml(
            cls,
            yaml_string: str = None,
            filename: Union[str, PathLike] = None,
            encoding: str = "utf-8",
            errors: str = "strict",
            **kwargs,
        ):
            """
            Transform a yaml object string into a BoxList object.

            :param yaml_string: string to pass to `yaml.load`
            :param filename: filename to open and pass to `yaml.load`
            :param encoding: File encoding
            :param errors: How to handle encoding errors
            :param kwargs: parameters to pass to `BoxList()` or `yaml.load`
            :return: BoxList object from yaml data
            """
            box_args = {}
            for arg in list(kwargs.keys()):
                if arg in BOX_PARAMETERS:
                    box_args[arg] = kwargs.pop(arg)

            data = _from_yaml(yaml_string=yaml_string, filename=filename, encoding=encoding, errors=errors, **kwargs)
            if not data:
                return cls(**box_args)
            if not isinstance(data, list):
                raise BoxError(f"yaml data not returned as a list but rather a {type(data).__name__}")
            return cls(data, **box_args)

            Transform a yaml object string into a BoxList object.

            :param yaml_string: string to pass to `yaml.load`
            :param filename: filename to open and pass to `yaml.load`
            :param encoding: File encoding
            :param errors: How to handle encoding errors
            :param kwargs: parameters to pass to `BoxList()` or `yaml.load`
            :return: BoxList object from yaml data
            
Transform a yaml object string into a BoxList object.
Transform a yaml object string into a BoxList object .
def from_yaml(
            cls,
            yaml_string: str = None,
            filename: Union[str, PathLike] = None,
            encoding: str = "utf-8",
            errors: str = "strict",
            **kwargs,
        ):
            box_args = {}
            for arg in list(kwargs.keys()):
                if arg in BOX_PARAMETERS:
                    box_args[arg] = kwargs.pop(arg)
            data = _from_yaml(yaml_string=yaml_string, filename=filename, encoding=encoding, errors=errors, **kwargs)
            if not data:
                return cls(**box_args)
            if not isinstance(data, list):
                raise BoxError(f"yaml data not returned as a list but rather a {type(data).__name__}")
            return cls(data, **box_args)
def from_yaml ( cls , yaml_string : str = None , filename : Union [ str , PathLike ] = None , encoding : str = "utf-8" , errors : str = "strict" , ** kwargs , ) : box_args = { } for arg in list ( kwargs . keys ( ) ) : if arg in BOX_PARAMETERS : box_args [ arg ] = kwargs . pop ( arg ) data = _from_yaml ( yaml_string = yaml_string , filename = filename , encoding = encoding , errors = errors , ** kwargs ) if not data : return cls ( ** box_args ) if not isinstance ( data , list ) : raise BoxError ( f"yaml data not returned as a list but rather a {type(data).__name__}" ) return cls ( data , ** box_args )
Transform a yaml object string into a BoxList object.
Transform a yaml object string into a BoxList object .
"""
            Transform a yaml object string into a BoxList object.

            :param yaml_string: string to pass to `yaml.load`
            :param filename: filename to open and pass to `yaml.load`
            :param encoding: File encoding
            :param errors: How to handle encoding errors
            :param kwargs: parameters to pass to `BoxList()` or `yaml.load`
            :return: BoxList object from yaml data
            """
BoxList object from yaml data
BoxList object from yaml data
cls
yaml_string
str
string to pass to `yaml.load`
string to pass to ` yaml . load `
filename
Union[str, PathLike]
filename to open and pass to `yaml.load`
filename to open and pass to ` yaml . load `
encoding
str
None
errors
str
None
kwargs
parameters to pass to `BoxList()` or `yaml.load`
parameters to pass to ` BoxList () ` or ` yaml . load `