def environment_vars_to_env_file()

in composer_local_dev/environment.py [0:0]


    def environment_vars_to_env_file(self):
        """
        Write fetched environment variables keys to `variables.env` file.
        """
        env_vars = sorted(
            f"# {key}=" for key, _ in self.environment_vars.items()
        )
        env_vars_lines = "\n".join(env_vars)
        with open(self.env_dir_path / "variables.env", "w") as fp:
            fp.write(env_vars_lines)