def create_file(filename: str | Path, data: str):
    """Utility to write data to filename."""
    encoding = str(default_settings.ENCODING_FOR_DYNACONF)
    with open(filename, "w", encoding=encoding) as f:
        f.write(dedent(f"{data}"))
    return filename
Utility to write data to filename.
tests/test_cli.py