Skip to content

Commit

Permalink
Remove unused type: ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
Qalthos committed Nov 25, 2024
1 parent 58be405 commit 7ab1800
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions tests/unit/model/v2/test_dependency_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def _model_dependency_section_data(): # type: ignore[no-untyped-def] # noqa: A
indirect=True,
)
def test_dependency(config): # type: ignore[no-untyped-def] # noqa: ANN001, ANN201, D103
assert not schema_v3.validate(config) # type: ignore[no-untyped-call]
assert not schema_v3.validate(config)


@pytest.fixture
Expand All @@ -58,7 +58,7 @@ def _model_dependency_errors_section_data(): # type: ignore[no-untyped-def] #
def test_dependency_has_errors(config): # type: ignore[no-untyped-def] # noqa: ANN001, ANN201, D103
x = ["0 is not one of ['galaxy', 'shell']"]

assert x == schema_v3.validate(config) # type: ignore[no-untyped-call]
assert x == schema_v3.validate(config)


@pytest.fixture
Expand All @@ -80,7 +80,7 @@ def _model_dependency_allows_shell_section_data(): # type: ignore[no-untyped-de
indirect=True,
)
def test_dependency_allows_shell_name(config): # type: ignore[no-untyped-def] # noqa: ANN001, ANN201, D103
assert not schema_v3.validate(config) # type: ignore[no-untyped-call]
assert not schema_v3.validate(config)


@pytest.fixture
Expand All @@ -96,4 +96,4 @@ def _model_dependency_shell_errors_section_data(): # type: ignore[no-untyped-de
def test_dependency_shell_has_errors(config): # type: ignore[no-untyped-def] # noqa: ANN001, ANN201, D103
x = ["None is not of type 'string'"]

assert x == schema_v3.validate(config) # type: ignore[no-untyped-call]
assert x == schema_v3.validate(config)
8 changes: 4 additions & 4 deletions tests/unit/model/v2/test_driver_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def _model_driver_section_data(): # type: ignore[no-untyped-def] # noqa: ANN20

@pytest.mark.parametrize("config", ["_model_driver_section_data"], indirect=True) # noqa: PT007
def test_driver(config): # type: ignore[no-untyped-def] # noqa: ANN001, ANN201, D103
assert not schema_v3.validate(config) # type: ignore[no-untyped-call]
assert not schema_v3.validate(config)


@pytest.fixture
Expand Down Expand Up @@ -77,7 +77,7 @@ def test_driver_has_errors(config): # type: ignore[no-untyped-def] # noqa: ANN
driver_name = f"'{config['driver']['name']}'"

error_msg = [f"{driver_name} {base_error_msg}"]
assert error_msg == schema_v3.validate(config) # type: ignore[no-untyped-call]
assert error_msg == schema_v3.validate(config)


@pytest.fixture
Expand All @@ -91,7 +91,7 @@ def _model_driver_provider_name_nullable_section_data(): # type: ignore[no-unty
indirect=True,
)
def test_driver_provider_name_nullable(config): # type: ignore[no-untyped-def] # noqa: ANN001, ANN201, D103
assert not schema_v3.validate(config) # type: ignore[no-untyped-call]
assert not schema_v3.validate(config)


@pytest.fixture
Expand Down Expand Up @@ -132,4 +132,4 @@ def _model_driver_allows_custom_section_data2(): # type: ignore[no-untyped-def]
indirect=True,
)
def test_driver_allows_name(config): # type: ignore[no-untyped-def] # noqa: ANN001, ANN201, D103
assert not schema_v3.validate(config) # type: ignore[no-untyped-call]
assert not schema_v3.validate(config)
2 changes: 1 addition & 1 deletion tests/unit/model/v2/test_platforms_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
indirect=True,
)
def test_platforms_delegated(config): # type: ignore[no-untyped-def] # noqa: ANN001, ANN201, D103
assert not schema_v3.validate(config) # type: ignore[no-untyped-call]
assert not schema_v3.validate(config)
6 changes: 3 additions & 3 deletions tests/unit/model/v2/test_provisioner_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def _model_provisioner_section_data(): # type: ignore[no-untyped-def] # noqa:
indirect=True,
)
def test_provisioner(config): # type: ignore[no-untyped-def] # noqa: ANN001, ANN201, D103
assert not schema_v3.validate(config) # type: ignore[no-untyped-call]
assert not schema_v3.validate(config)


@pytest.fixture
Expand All @@ -79,7 +79,7 @@ def _model_provisioner_errors_section_data(): # type: ignore[no-untyped-def] #
def test_provisioner_has_errors(config): # type: ignore[no-untyped-def] # noqa: ANN001, ANN201, D103
x = ["0 is not one of ['ansible']"]

assert x == schema_v3.validate(config) # type: ignore[no-untyped-call]
assert x == schema_v3.validate(config)


@pytest.fixture
Expand All @@ -93,4 +93,4 @@ def _model_provisioner_allows_ansible_section_data(): # type: ignore[no-untyped
indirect=True,
)
def test_provisioner_allows_name(config): # type: ignore[no-untyped-def] # noqa: ANN001, ANN201, D103
assert not schema_v3.validate(config) # type: ignore[no-untyped-call]
assert not schema_v3.validate(config)
4 changes: 2 additions & 2 deletions tests/unit/model/v2/test_scenario_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _model_scenario_section_data(): # type: ignore[no-untyped-def] # noqa: ANN

@pytest.mark.parametrize("config", ["_model_scenario_section_data"], indirect=True) # noqa: PT007
def test_scenario(config): # type: ignore[no-untyped-def] # noqa: ANN001, ANN201, D103
assert not schema_v3.validate(config) # type: ignore[no-untyped-call]
assert not schema_v3.validate(config)


@pytest.fixture
Expand All @@ -56,4 +56,4 @@ def _model_scenario_errors_section_data(): # type: ignore[no-untyped-def] # no
def test_scenario_has_errors(config): # type: ignore[no-untyped-def] # noqa: ANN001, ANN201, D103
x = ["0 is not of type 'string'"]

assert x == schema_v3.validate(config) # type: ignore[no-untyped-call]
assert x == schema_v3.validate(config)
2 changes: 1 addition & 1 deletion tests/unit/model/v2/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@


def test_base_config(config): # type: ignore[no-untyped-def] # noqa: ANN001, ANN201, D103
assert not schema_v3.validate(config) # type: ignore[no-untyped-call]
assert not schema_v3.validate(config)


def test_molecule_schema(resources_folder_path: Path) -> None:
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/model/v2/test_verifier_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _model_verifier_section_data(): # type: ignore[no-untyped-def] # noqa: ANN

@pytest.mark.parametrize("config", ["_model_verifier_section_data"], indirect=True) # noqa: PT007
def test_verifier(config): # type: ignore[no-untyped-def] # noqa: ANN001, ANN201, D103
assert not schema_v3.validate(config) # type: ignore[no-untyped-call]
assert not schema_v3.validate(config)


@pytest.fixture
Expand All @@ -60,7 +60,7 @@ def _model_verifier_errors_section_data(): # type: ignore[no-untyped-def] # no
def test_verifier_has_errors(config): # type: ignore[no-untyped-def] # noqa: ANN001, ANN201, D103
x = ["0 is not one of ['ansible', 'goss', 'inspec', 'testinfra']"]

assert x == schema_v3.validate(config) # type: ignore[no-untyped-call]
assert x == schema_v3.validate(config)


@pytest.fixture
Expand All @@ -82,4 +82,4 @@ def _model_verifier_allows_ansible_section_data(): # type: ignore[no-untyped-de
indirect=True,
)
def test_verifier_allows_name(config): # type: ignore[no-untyped-def] # noqa: ANN001, ANN201, D103
assert not schema_v3.validate(config) # type: ignore[no-untyped-call]
assert not schema_v3.validate(config)

0 comments on commit 7ab1800

Please sign in to comment.