File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1414
1515from pydantic import ValidationError as PydanticValidationError
1616
17- from .defaults import DEFAULTS
1817from .models import (
1918 AppConfig as Config ,
2019)
@@ -94,7 +93,8 @@ def config(self) -> Config:
9493 def _load (self ) -> None :
9594 """Load configuration from all sources."""
9695 # Start with defaults
97- self ._raw = self ._deep_copy (DEFAULTS )
96+ config = Config ()
97+ self ._raw = config .model_dump ()
9898
9999 # Load from file if provided
100100 if self .config_path and self .config_path .exists ():
@@ -225,10 +225,11 @@ def save(self, path: str | Path) -> None:
225225 # Create config dict excluding defaults that haven't changed
226226 config_to_save = {}
227227 current_config = self .config .model_dump ()
228+ default_config = Config ().model_dump ()
228229
229230 # Only include non-default values
230231 for key , value in current_config .items ():
231- default_value = DEFAULTS .get (key )
232+ default_value = default_config .get (key )
232233 if value != default_value :
233234 config_to_save [key ] = value
234235
You can’t perform that action at this time.
0 commit comments