Skip to content

Commit 4014cde

Browse files
authored
Merge pull request #852 from LalatenduMohanty/851
test(packagesettings): add missing type annotations
2 parents 90ae492 + 0c5f073 commit 4014cde

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/test_packagesettings.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def test_parse_full_file(testdata_path: pathlib.Path) -> None:
203203
assert p.model_dump() == FULL_EXPECTED
204204

205205

206-
def test_parse_minimal(testdata_path) -> None:
206+
def test_parse_minimal(testdata_path: pathlib.Path) -> None:
207207
filename = testdata_path / "context/overrides/settings/test_empty_pkg.yaml"
208208
p = PackageSettings.from_string(TEST_EMPTY_PKG, filename.read_text())
209209
assert p.model_dump() == EMPTY_EXPECTED
@@ -646,8 +646,8 @@ def test_package_settings_git_options_default() -> None:
646646

647647
def test_package_settings_git_options_from_dict() -> None:
648648
"""Test PackageSettings can parse git_options from dictionary."""
649-
settings = PackageSettings(
650-
**{ # type: ignore[arg-type]
649+
settings = PackageSettings.model_validate(
650+
{
651651
"name": "test-pkg",
652652
"has_config": True,
653653
"git_options": {
@@ -661,14 +661,14 @@ def test_package_settings_git_options_from_dict() -> None:
661661

662662
def test_package_settings_git_options_from_dict_empty() -> None:
663663
"""Test PackageSettings can parse empty git_options from dictionary."""
664-
settings = PackageSettings(
665-
**{"name": "test-pkg", "has_config": True, "git_options": {}} # type: ignore[arg-type]
664+
settings = PackageSettings.model_validate(
665+
{"name": "test-pkg", "has_config": True, "git_options": {}}
666666
)
667667
assert settings.git_options.submodules is False # Default value
668668
assert settings.git_options.submodule_paths == [] # Default value
669669

670670

671-
def test_package_settings_git_options_from_file(tmp_path) -> None:
671+
def test_package_settings_git_options_from_file() -> None:
672672
"""Test PackageSettings can parse git_options from a YAML file."""
673673
data = """
674674
git_options:

0 commit comments

Comments
 (0)