Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #238

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ repos:
.*\{\{.*
)$
- repo: https://github.com/PyCQA/doc8.git
rev: v1.1.1
rev: v1.1.2
hooks:
- id: doc8
- repo: https://github.com/psf/black
rev: 24.1.1
rev: 24.10.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v4.5.0
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand All @@ -42,12 +42,12 @@ repos:
- id: check-merge-conflict
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.2.0"
rev: "v0.8.6"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/ansible/ansible-lint.git
rev: v6.22.2
rev: v24.12.2
hooks:
- id: ansible-lint
entry: env ANSIBLE_ROLES_PATH="$ANSIBLE_ROLES_PATH:test/roles" ansible-lint
10 changes: 2 additions & 8 deletions src/molecule_plugins/vagrant/modules/vagrant.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,10 +499,7 @@ def _conf_instance(self, instance_name):
try:
return self._vagrant.conf(vm_name=instance_name)
except Exception:
msg = "Failed to get vagrant config for {}: See log file '{}'".format(
instance_name,
self._get_stderr_log(),
)
msg = f"Failed to get vagrant config for {instance_name}: See log file '{self._get_stderr_log()}'"
with open(self._get_stderr_log(), encoding="utf-8") as f:
self.result["stderr"] = f.read()
self._module.fail_json(msg=msg, **self.result)
Expand All @@ -513,10 +510,7 @@ def _status_instance(self, instance_name):

return {"name": s.name, "state": s.state, "provider": s.provider}
except Exception:
msg = "Failed to get status for {}: See log file '{}'".format(
instance_name,
self._get_stderr_log(),
)
msg = f"Failed to get status for {instance_name}: See log file '{self._get_stderr_log()}'"
with open(self._get_stderr_log(), encoding="utf-8") as f:
self.result["stderr"] = f.read()
self._module.fail_json(msg=msg, **self.result)
Expand Down
Loading