diff --git a/omegaconf/omegaconf.py b/omegaconf/omegaconf.py index efde14a4e..9a674c023 100644 --- a/omegaconf/omegaconf.py +++ b/omegaconf/omegaconf.py @@ -182,7 +182,10 @@ def create( # noqa F811 ) @staticmethod - def load(file_: Union[str, pathlib.Path, IO[Any]]) -> Union[DictConfig, ListConfig]: + def load( + file_: Union[str, pathlib.Path, IO[Any]], + flags: Optional[Dict[str, bool]] = None, + ) -> Union[DictConfig, ListConfig]: from ._utils import get_yaml_loader if isinstance(file_, (str, pathlib.Path)): @@ -200,9 +203,9 @@ def load(file_: Union[str, pathlib.Path, IO[Any]]) -> Union[DictConfig, ListConf ret: Union[DictConfig, ListConfig] if obj is None: - ret = OmegaConf.create() + ret = OmegaConf.create(flags=flags) else: - ret = OmegaConf.create(obj) + ret = OmegaConf.create(obj, flags=flags) return ret @staticmethod