INNER CODE UNIT · Python

represent_set

mongodb/mongo-c-driver · .evergreen/legacy_config_generator/evergreen_config_generator/__init__.py:77

    def represent_set(self, data: Iterable[Value]) -> yaml.MappingNode:
        return super().represent_list(sorted(set(data)))  # type: ignore

    def represent_config_object(self, obj: ConfigObject) -> yaml.Node:
        d = obj.to_dict()
        return super().represent_data(d)  # type: ignore


def yaml_dump(obj: Any):
    return yaml.dump(obj, Dumper=_Dumper, default_flow_style=False)


def generate(config: Any, path: str):
    """Dump config to a file as YAML.
    config is a dict, preferably an OrderedDict. path is a file path.
    """
    f = open(path, 'w+')
    f.write(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…