Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions python_template_server/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def save_to_file(self, filepath: Path) -> None:
"""
with filepath.open("w", encoding="utf-8") as config_file:
config_file.write(self.model_dump_json(indent=2))
config_file.write("\n")


# Prometheus Metric Models
Expand Down
2 changes: 1 addition & 1 deletion tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def test_save_to_file(
"""Test the save_to_file method."""
config_file = tmp_path / "config.json"
mock_template_server_config.save_to_file(config_file)
assert config_file.read_text(encoding="utf-8") == mock_template_server_config.model_dump_json(indent=2)
assert config_file.read_text(encoding="utf-8") == mock_template_server_config.model_dump_json(indent=2) + "\n"


# Prometheus Metric Models
Expand Down