(file_path, auth_config: str)
| 18 | |
| 19 | |
| 20 | def include_auth_config(file_path, auth_config: str): |
| 21 | with open(file_path, "r") as file: |
| 22 | existing_content = yaml.safe_load(file) |
| 23 | new_section = yaml.safe_load(auth_config) |
| 24 | if isinstance(existing_content, dict) and isinstance(new_section, dict): |
| 25 | existing_content.update(new_section) |
| 26 | else: |
| 27 | raise ValueError("Both existing content and new section must be dictionaries.") |
| 28 | with open(file_path, "w") as file: |
| 29 | yaml.safe_dump(existing_content, file, default_flow_style=False) |
| 30 | print(f"Updated auth section at {file_path}") |
| 31 | |
| 32 | |
| 33 | def default_store( |
no test coverage detected