Skip to content

Commit

Permalink
chore: pre-commit autoupdate (#4282)
Browse files Browse the repository at this point in the history
<!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.5.6 →
v0.6.3](astral-sh/ruff-pre-commit@v0.5.6...v0.6.3)
- [github.com/streetsidesoftware/cspell-cli: v8.13.1 →
v8.13.3](streetsidesoftware/cspell-cli@v8.13.1...v8.13.3)
- [github.com/pycqa/pylint.git: v3.2.6 →
v3.2.7](https://github.com/pycqa/pylint.git/compare/v3.2.6...v3.2.7)
- [github.com/pre-commit/mirrors-mypy.git: v1.11.1 →
v1.11.2](https://github.com/pre-commit/mirrors-mypy.git/compare/v1.11.1...v1.11.2)
<!--pre-commit.ci end-->

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] committed Sep 6, 2024
1 parent 4d8961e commit d0205bd
Show file tree
Hide file tree
Showing 35 changed files with 89 additions and 89 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ repos:
- id: tox-ini-fmt

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.6
rev: v0.6.3
hooks:
- id: ruff
args:
- --exit-non-zero-on-fix

- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.13.1
rev: v8.13.3
hooks:
- id: cspell
name: Spell check with cspell
Expand All @@ -80,7 +80,7 @@ repos:
pass_filenames: false

- repo: https://github.com/pycqa/pylint.git
rev: v3.2.6
rev: v3.2.7
hooks:
- id: pylint
args:
Expand All @@ -98,7 +98,7 @@ repos:
- wcmatch

- repo: https://github.com/pre-commit/mirrors-mypy.git
rev: v1.11.1
rev: v1.11.2
hooks:
- id: mypy
additional_dependencies:
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def pytest_collection_modifyitems(items, config): # type: ignore[no-untyped-def


@pytest.fixture(autouse=True)
def reset_pytest_vars(monkeypatch): # type: ignore[no-untyped-def] # noqa: ANN001, ANN201, PT004
def reset_pytest_vars(monkeypatch): # type: ignore[no-untyped-def] # noqa: ANN001, ANN201
"""Make PYTEST_* env vars inaccessible to subprocesses."""
for var_name in tuple(os.environ):
if var_name.startswith("PYTEST_"):
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/command/test_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@


@pytest.fixture()
def _patched_ansible_check(mocker): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202, PT005
def _patched_ansible_check(mocker): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202
return mocker.patch("molecule.provisioner.ansible.Ansible.check")


Expand Down
4 changes: 2 additions & 2 deletions tests/unit/command/test_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@


@pytest.fixture()
def _command_provisioner_section_with_cleanup_data(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _command_provisioner_section_with_cleanup_data(): # type: ignore[no-untyped-def] # noqa: ANN202
return {"provisioner": {"name": "ansible", "playbooks": {"cleanup": "cleanup.yml"}}}


@pytest.fixture()
def _patched_ansible_cleanup(mocker): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202, PT005
def _patched_ansible_cleanup(mocker): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202
return mocker.patch("molecule.provisioner.ansible.Ansible.cleanup")


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


@pytest.fixture()
def _patched_create_setup(mocker): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202, PT005
def _patched_create_setup(mocker): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202
return mocker.patch("molecule.command.create.Create._setup")


Expand Down
4 changes: 2 additions & 2 deletions tests/unit/command/test_destroy.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@


@pytest.fixture()
def _patched_ansible_destroy(mocker): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202, PT005
def _patched_ansible_destroy(mocker): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202
return mocker.patch("molecule.provisioner.ansible.Ansible.destroy")


@pytest.fixture()
def _patched_destroy_setup(mocker): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202, PT005
def _patched_destroy_setup(mocker): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202
return mocker.patch("molecule.command.destroy.Destroy._setup")


Expand Down
4 changes: 2 additions & 2 deletions tests/unit/command/test_idempotence.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@


@pytest.fixture()
def _patched_is_idempotent(mocker: MockerFixture) -> Mock: # noqa: PT005
def _patched_is_idempotent(mocker: MockerFixture) -> Mock:
return mocker.patch("molecule.command.idempotence.Idempotence._is_idempotent")


# NOTE(retr0h): The use of the `patched_config_validate` fixture, disables
# config.Config._validate from executing. Thus preventing odd side-effects
# throughout patched.assert_called unit tests.
@pytest.fixture()
def _instance(patched_config_validate, config_instance: config.Config): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202, PT005, ARG001
def _instance(patched_config_validate, config_instance: config.Config): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202, ARG001
config_instance.state.change_state("converged", True) # noqa: FBT003

return idempotence.Idempotence(config_instance)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/command/test_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@


@pytest.fixture()
def _instance(config_instance: config.Config): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _instance(config_instance: config.Config): # type: ignore[no-untyped-def] # noqa: ANN202
config_instance.state.change_state("created", True) # noqa: FBT003

return login.Login(config_instance)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/command/test_prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@


@pytest.fixture()
def _patched_ansible_prepare(mocker): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202, PT005
def _patched_ansible_prepare(mocker): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202
return mocker.patch("molecule.provisioner.ansible.Ansible.prepare")


Expand Down
4 changes: 2 additions & 2 deletions tests/unit/command/test_side_effect.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@


@pytest.fixture()
def _command_provisioner_section_with_side_effect_data(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _command_provisioner_section_with_side_effect_data(): # type: ignore[no-untyped-def] # noqa: ANN202
return {
"provisioner": {
"name": "ansible",
Expand All @@ -44,7 +44,7 @@ def _command_provisioner_section_with_side_effect_data(): # type: ignore[no-unt


@pytest.fixture()
def _patched_ansible_side_effect(mocker): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202, PT005
def _patched_ansible_side_effect(mocker): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202
return mocker.patch("molecule.provisioner.ansible.Ansible.side_effect")


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


@pytest.fixture()
def _patched_ansible_syntax(mocker): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202, PT005
def _patched_ansible_syntax(mocker): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202
return mocker.patch("molecule.provisioner.ansible.Ansible.syntax")


Expand Down
6 changes: 3 additions & 3 deletions tests/unit/dependency/ansible_galaxy/test_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@


@pytest.fixture()
def _patched_ansible_galaxy_has_requirements_file(mocker): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202, PT005
def _patched_ansible_galaxy_has_requirements_file(mocker): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202
m = mocker.patch(
"molecule.dependency.ansible_galaxy.collections.Collections._has_requirements_file",
)
Expand All @@ -38,7 +38,7 @@ def _patched_ansible_galaxy_has_requirements_file(mocker): # type: ignore[no-un


@pytest.fixture()
def _dependency_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _dependency_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202
return {
"dependency": {
"name": "galaxy",
Expand All @@ -52,7 +52,7 @@ def _dependency_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202,
# config.Config._validate from executing. Thus preventing odd side-effects
# throughout patched.assert_called unit tests.
@pytest.fixture()
def _instance( # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _instance( # type: ignore[no-untyped-def] # noqa: ANN202
_dependency_section_data, # noqa: ANN001
patched_config_validate, # noqa: ANN001, ARG001
config_instance: config.Config,
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/dependency/ansible_galaxy/test_roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@


@pytest.fixture()
def _patched_ansible_galaxy_has_requirements_file(mocker): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202, PT005
def _patched_ansible_galaxy_has_requirements_file(mocker): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202
m = mocker.patch(
"molecule.dependency.ansible_galaxy.roles.Roles._has_requirements_file",
)
Expand All @@ -38,7 +38,7 @@ def _patched_ansible_galaxy_has_requirements_file(mocker): # type: ignore[no-un


@pytest.fixture()
def _dependency_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _dependency_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202
return {
"dependency": {
"name": "galaxy",
Expand All @@ -52,7 +52,7 @@ def _dependency_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202,
# config.Config._validate from executing. Thus preventing odd side-effects
# throughout patched.assert_called unit tests.
@pytest.fixture()
def _instance( # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _instance( # type: ignore[no-untyped-def] # noqa: ANN202
_dependency_section_data, # noqa: ANN001
patched_config_validate, # noqa: ANN001, ARG001
config_instance: config.Config,
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/dependency/test_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


@pytest.fixture()
def _dependency_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _dependency_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202
return {
"dependency": {
"name": "shell",
Expand All @@ -41,7 +41,7 @@ def _dependency_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202,
# config.Config._validate from executing. Thus preventing odd side-effects
# throughout patched.assert_called unit tests.
@pytest.fixture()
def _instance( # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _instance( # type: ignore[no-untyped-def] # noqa: ANN202
_dependency_section_data, # noqa: ANN001
patched_config_validate, # noqa: ANN001, ARG001
config_instance: config.Config,
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/driver/test_delegated.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@


@pytest.fixture()
def _driver_managed_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _driver_managed_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202
return {
"driver": {
"name": "default",
Expand All @@ -47,7 +47,7 @@ def _driver_managed_section_data(): # type: ignore[no-untyped-def] # noqa: ANN


@pytest.fixture()
def _driver_unmanaged_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _driver_unmanaged_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202
return {
"driver": {
"name": "default",
Expand All @@ -59,7 +59,7 @@ def _driver_unmanaged_section_data(): # type: ignore[no-untyped-def] # noqa: A


@pytest.fixture()
def _instance(config_instance: config.Config): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _instance(config_instance: config.Config): # type: ignore[no-untyped-def] # noqa: ANN202
return delegated.Delegated(config_instance)


Expand Down Expand Up @@ -342,7 +342,7 @@ def test_delegated_created(_instance): # type: ignore[no-untyped-def] # noqa:


@pytest.fixture()
def _driver_options_managed_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _driver_options_managed_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202
return {"driver": {"options": {"managed": False}}}


Expand Down
2 changes: 1 addition & 1 deletion tests/unit/model/v2/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def config(molecule_file: Path, request: pytest.FixtureRequest) -> dict[str, Any


@pytest.fixture()
def _model_platforms_delegated_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _model_platforms_delegated_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202
return """
---
platforms:
Expand Down
10 changes: 5 additions & 5 deletions tests/unit/model/v2/test_dependency_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@


@pytest.fixture()
def _model_dependency_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _model_dependency_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202
return {
"dependency": {
"name": "galaxy",
Expand All @@ -46,7 +46,7 @@ def test_dependency(config): # type: ignore[no-untyped-def] # noqa: ANN001, AN


@pytest.fixture()
def _model_dependency_errors_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _model_dependency_errors_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202
return {"dependency": {"name": 0}}


Expand All @@ -62,12 +62,12 @@ def test_dependency_has_errors(config): # type: ignore[no-untyped-def] # noqa:


@pytest.fixture()
def _model_dependency_allows_galaxy_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _model_dependency_allows_galaxy_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202
return {"dependency": {"name": "galaxy"}}


@pytest.fixture()
def _model_dependency_allows_shell_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _model_dependency_allows_shell_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202
return {"dependency": {"name": "shell"}}


Expand All @@ -84,7 +84,7 @@ def test_dependency_allows_shell_name(config): # type: ignore[no-untyped-def]


@pytest.fixture()
def _model_dependency_shell_errors_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _model_dependency_shell_errors_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202
return {"dependency": {"name": "shell", "command": None}}


Expand Down
18 changes: 9 additions & 9 deletions tests/unit/model/v2/test_driver_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@


@pytest.fixture()
def _model_driver_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _model_driver_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202
return {
"driver": {
"name": "default",
Expand All @@ -43,7 +43,7 @@ def test_driver(config): # type: ignore[no-untyped-def] # noqa: ANN001, ANN201


@pytest.fixture()
def _model_driver_errors_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _model_driver_errors_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202
return {
"driver": {
"name": 0,
Expand All @@ -52,7 +52,7 @@ def _model_driver_errors_section_data(): # type: ignore[no-untyped-def] # noqa


@pytest.fixture()
def _model_driver_errors_section_data_no_prefix(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _model_driver_errors_section_data_no_prefix(): # type: ignore[no-untyped-def] # noqa: ANN202
return {
"driver": {
"name": "random_name",
Expand Down Expand Up @@ -81,7 +81,7 @@ def test_driver_has_errors(config): # type: ignore[no-untyped-def] # noqa: ANN


@pytest.fixture()
def _model_driver_provider_name_nullable_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _model_driver_provider_name_nullable_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202
return {"driver": {"provider": {"name": None}}}


Expand All @@ -95,27 +95,27 @@ def test_driver_provider_name_nullable(config): # type: ignore[no-untyped-def]


@pytest.fixture()
def _model_driver_allows_delegated_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _model_driver_allows_delegated_section_data(): # type: ignore[no-untyped-def] # noqa: ANN202
return {"driver": {"name": "default"}}


@pytest.fixture()
def _model_driver_allows_molecule_section_data1(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _model_driver_allows_molecule_section_data1(): # type: ignore[no-untyped-def] # noqa: ANN202
return {"driver": {"name": "molecule-test_driver.name"}}


@pytest.fixture()
def _model_driver_allows_molecule_section_data2(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _model_driver_allows_molecule_section_data2(): # type: ignore[no-untyped-def] # noqa: ANN202
return {"driver": {"name": "molecule_test_driver.name"}}


@pytest.fixture()
def _model_driver_allows_custom_section_data1(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _model_driver_allows_custom_section_data1(): # type: ignore[no-untyped-def] # noqa: ANN202
return {"driver": {"name": "custom-test_driver.name"}}


@pytest.fixture()
def _model_driver_allows_custom_section_data2(): # type: ignore[no-untyped-def] # noqa: ANN202, PT005
def _model_driver_allows_custom_section_data2(): # type: ignore[no-untyped-def] # noqa: ANN202
return {"driver": {"name": "custom_test_driver.name"}}


Expand Down
Loading

0 comments on commit d0205bd

Please sign in to comment.