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
2 changes: 1 addition & 1 deletion pydantic_settings/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ class CliAppBaseSettings(BaseSettings, model_cls): # type: ignore

model = CliAppBaseSettings(**model_init_data)
model_init_data = {}
for field_name, field_info in model.model_fields.items():
for field_name, field_info in type(model).model_fields.items():
model_init_data[_field_name_for_signature(field_name, field_info)] = getattr(model, field_name)

return CliApp._run_cli_cmd(model_cls(**model_init_data), cli_cmd_method_name, is_required=False)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_source_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


def test_repr() -> None:
source = JsonConfigSettingsSource(BaseSettings(), Path('config.json'))
source = JsonConfigSettingsSource(BaseSettings, Path('config.json'))
assert repr(source) == 'JsonConfigSettingsSource(json_file=config.json)'


Expand Down
2 changes: 1 addition & 1 deletion tests/test_source_toml.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@


def test_repr() -> None:
source = TomlConfigSettingsSource(BaseSettings(), Path('config.toml'))
source = TomlConfigSettingsSource(BaseSettings, Path('config.toml'))
assert repr(source) == 'TomlConfigSettingsSource(toml_file=config.toml)'


Expand Down
2 changes: 1 addition & 1 deletion tests/test_source_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@


def test_repr() -> None:
source = YamlConfigSettingsSource(BaseSettings(), Path('config.yaml'))
source = YamlConfigSettingsSource(BaseSettings, Path('config.yaml'))
assert repr(source) == 'YamlConfigSettingsSource(yaml_file=config.yaml)'


Expand Down
Loading