Skip to content

Commit

Permalink
chore: pre-commit autoupdate (#440)
Browse files Browse the repository at this point in the history
* chore: pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.8.1 → v0.8.6](astral-sh/ruff-pre-commit@v0.8.1...v0.8.6)
- [github.com/pre-commit/mirrors-mypy: v1.13.0 → v1.14.1](pre-commit/mirrors-mypy@v1.13.0...v1.14.1)
- [github.com/pycqa/pylint: v3.3.2 → v3.3.3](pylint-dev/pylint@v3.3.2...v3.3.3)

* Fixes

* chore: auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sorin Sbarnea <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and ssbarnea authored Jan 6, 2025
1 parent 306fbe9 commit 18696a6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ exclude: |
)$
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.8.1"
rev: "v0.8.6"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down Expand Up @@ -73,7 +73,7 @@ repos:
- id: black
language_version: python3
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
rev: v1.14.1
hooks:
- id: mypy
# empty args needed in order to match mypy cli behavior
Expand All @@ -90,7 +90,7 @@ repos:
- types-setuptools
- types-jsonschema>=4.4.9
- repo: https://github.com/pycqa/pylint
rev: v3.3.2
rev: v3.3.3
hooks:
- id: pylint
additional_dependencies:
Expand Down
2 changes: 1 addition & 1 deletion src/ansible_compat/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ class AnsibleConfig(UserDict[str, object]): # pylint: disable=too-many-ancestor
galaxy_role_skeleton_ignore: list[str] = ["^.git$", "^.*/.git_keep$"]
galaxy_server: str = "https://galaxy.ansible.com"
galaxy_server_list: str | None = None
galaxy_token_path: str = "~/.ansible/galaxy_token"
galaxy_token_path: str = "~/.ansible/galaxy_token" # noqa: S105
host_key_checking: bool = True
host_pattern_mismatch: Literal["warning", "error", "ignore"] = "warning"
inject_facts_as_vars: bool = True
Expand Down
6 changes: 5 additions & 1 deletion src/ansible_compat/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,11 @@ def install_requirements( # noqa: C901
raise AnsibleCommandError(result)

# Run galaxy collection install works on v2 requirements.yml
if "collections" in reqs_yaml and reqs_yaml["collections"] is not None:
if (
isinstance(reqs_yaml, dict)
and "collections" in reqs_yaml
and reqs_yaml["collections"] is not None
):
cmd = [
"ansible-galaxy",
"collection",
Expand Down

0 comments on commit 18696a6

Please sign in to comment.