Skip to content

Commit e100833

Browse files
committed
docs: update docstrings to include ValidationError
- Add ValidationError to HelmValuesConfig.validate docstring - Add ValidationError to BaseCommand.save_config docstring - Clarify when each error type is raised
1 parent 6866bba commit e100833

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

helm_values_manager/commands/base_command.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ def save_config(self, config: HelmValuesConfig) -> None:
7373
7474
Raises:
7575
IOError: If unable to write to the file.
76-
ValueError: If the configuration is invalid.
76+
ValueError: If the configuration is invalid (e.g., missing release name).
77+
ValidationError: If JSON schema validation fails.
7778
"""
7879
# Validate the config before saving
7980
config.validate()

helm_values_manager/models/helm_values_config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ def validate(self) -> None:
140140
Validate the configuration.
141141
142142
Raises:
143-
ValueError: If validation fails.
143+
ValueError: If validation fails (e.g., missing release name)
144+
ValidationError: If JSON schema validation fails
144145
"""
145146
if not self.release:
146147
raise ValueError("Release name is required")

0 commit comments

Comments
 (0)