Thanks to visit codestin.com
Credit goes to github.com

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
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/asottile/add-trailing-comma.git
rev: v3.1.0
rev: v3.2.0
hooks:
- id: add-trailing-comma

Expand Down Expand Up @@ -57,18 +57,18 @@ repos:
- id: tox-ini-fmt

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.8
rev: v0.11.12
hooks:
- id: ruff
entry: sh -c 'ruff check --fix --force-exclude && ruff format --force-exclude'
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.19.1
rev: v9.0.1
hooks:
- id: cspell
name: Spell check with cspell

- repo: https://github.com/jsh9/pydoclint
rev: "0.6.6"
rev: "0.6.7"
hooks:
- id: pydoclint
# This allows automatic reduction of the baseline file when needed.
Expand All @@ -94,7 +94,7 @@ repos:
- wcmatch

- repo: https://github.com/pre-commit/mirrors-mypy.git
rev: v1.15.0
rev: v1.16.0
hooks:
- id: mypy
additional_dependencies:
Expand Down Expand Up @@ -139,7 +139,7 @@ repos:
additional_dependencies:
- uv>=0.5.21
- repo: https://github.com/ansible/ansible-lint
rev: v25.4.0
rev: v25.5.0
hooks:
- id: ansible-lint
stages: [manual]
4 changes: 3 additions & 1 deletion src/molecule/driver/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@


if TYPE_CHECKING:
from typing import Any

from molecule.config import Config
from molecule.types import DriverOptions

Expand Down Expand Up @@ -131,7 +133,7 @@ def login_options(
def ansible_connection_options(
self,
instance_name: str,
) -> dict[str, str]: # pragma: no cover
) -> dict[str, Any]: # pragma: no cover
"""Ansible specific connection options supplied to inventory and returns a dict.

Args:
Expand Down
12 changes: 7 additions & 5 deletions src/molecule/driver/delegated.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,16 @@
import logging

from pathlib import Path
from typing import TYPE_CHECKING, Any
from typing import TYPE_CHECKING

from molecule import util
from molecule.api import Driver
from molecule.data import __file__ as data_module


if TYPE_CHECKING:
from typing import Any

from molecule.config import Config


Expand Down Expand Up @@ -242,7 +244,7 @@ def login_options(self, instance_name: str) -> dict[str, str]:
def ansible_connection_options(
self,
instance_name: str,
) -> dict[str, str]:
) -> dict[str, Any]:
"""Ansible connection options.

Args:
Expand Down Expand Up @@ -286,15 +288,15 @@ def ansible_connection_options(
conn_dict["ansible_ssh_common_args"] = " ".join(
self.ssh_connection_options,
)

return conn_dict # noqa: TRY300

except StopIteration:
return {}
except OSError:
# Instance has yet to be provisioned , therefore the
# instance_config is not on disk.
return {}
else:
return conn_dict

return self.options.get("ansible_connection_options", {})

def _created(self) -> str:
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def _patched_logger_env(request, monkeypatch): # type: ignore[no-untyped-def]
get_section_logger_tests,
indirect=True,
)
def test_get_section_loggers(_patched_logger_env): # type: ignore[no-untyped-def] # noqa: ANN201, PT019, D103
def test_get_section_loggers(_patched_logger_env): # type: ignore[no-untyped-def] # noqa: ANN201, D103
expected_section_loggers = _patched_logger_env
get_section_loggers.cache_clear()
section_loggers = get_section_loggers()
Expand Down
Loading