From 1187bd2e8a78b948240d77186c7519671cf613ea Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 17:06:18 +0000 Subject: [PATCH 1/2] chore: pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/mirrors-prettier: v3.0.3 → v4.0.0-alpha.8](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.3...v4.0.0-alpha.8) - [github.com/pre-commit/pre-commit-hooks.git: v4.4.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks.git/compare/v4.4.0...v6.0.0) - https://github.com/psf/black → https://github.com/psf/black-pre-commit-mirror - [github.com/psf/black-pre-commit-mirror: 23.7.0 → 25.11.0](https://github.com/psf/black-pre-commit-mirror/compare/23.7.0...25.11.0) - [github.com/pycqa/flake8.git: 6.1.0 → 7.3.0](https://github.com/pycqa/flake8.git/compare/6.1.0...7.3.0) - [github.com/pre-commit/mirrors-mypy: v1.5.1 → v1.19.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.5.1...v1.19.0) - [github.com/pycqa/pylint: v3.0.0a7 → v4.0.4](https://github.com/pycqa/pylint/compare/v3.0.0a7...v4.0.4) - [github.com/jazzband/pip-tools: 7.3.0 → v7.5.2](https://github.com/jazzband/pip-tools/compare/7.3.0...v7.5.2) --- .pre-commit-config.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 163518b..a6b78dc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,14 +12,14 @@ ci: repos: - repo: https://github.com/pre-commit/mirrors-prettier # keep it before yamllint - rev: v3.0.3 + rev: v4.0.0-alpha.8 hooks: - id: prettier additional_dependencies: - prettier - prettier-plugin-toml - repo: https://github.com/pre-commit/pre-commit-hooks.git - rev: v4.4.0 + rev: v6.0.0 hooks: - id: end-of-file-fixer - id: trailing-whitespace @@ -28,12 +28,12 @@ repos: - id: check-executables-have-shebangs - id: check-merge-conflict - id: debug-statements - - repo: https://github.com/psf/black - rev: 23.7.0 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 25.11.0 hooks: - id: black - repo: https://github.com/pycqa/flake8.git - rev: 6.1.0 + rev: 7.3.0 hooks: - id: flake8 language_version: python3 @@ -42,19 +42,19 @@ repos: - flake8-docstrings>=1.6.0 - flake8-pytest-style>=1.6.0 - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.5.1 + rev: v1.19.0 hooks: - id: mypy # empty args needed in order to match mypy cli behavior # args: [--strict] - repo: https://github.com/pycqa/pylint - rev: v3.0.0a7 + rev: v4.0.4 hooks: - id: pylint additional_dependencies: - pytest - repo: https://github.com/jazzband/pip-tools - rev: 7.3.0 + rev: v7.5.2 hooks: - id: pip-compile entry: pip-compile --resolver=backtracking -q --no-annotate --output-file=requirements.txt pyproject.toml --extra test --strip-extras From ad0d6ba3f8d513c0ffb72a4611f6294f0ffd7c24 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 17:08:42 +0000 Subject: [PATCH 2/2] chore: auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/vagrant/__init__.py | 8 ++------ src/vagrant/test.py | 1 + tests/test_vagrant_test_case.py | 1 + 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/vagrant/__init__.py b/src/vagrant/__init__.py index ea880a4..a2746a5 100644 --- a/src/vagrant/__init__.py +++ b/src/vagrant/__init__.py @@ -348,9 +348,7 @@ def up( provision_arg = ( None if provision is None - else "--provision" - if provision - else "--no-provision" + else "--provision" if provision else "--no-provision" ) args = [ @@ -409,9 +407,7 @@ def reload( provision_arg = ( None if provision is None - else "--provision" - if provision - else "--no-provision" + else "--provision" if provision else "--no-provision" ) args = ["reload", vm_name, provision_arg, prov_with_arg, providers_arg] diff --git a/src/vagrant/test.py b/src/vagrant/test.py index 457319d..f495aff 100644 --- a/src/vagrant/test.py +++ b/src/vagrant/test.py @@ -4,6 +4,7 @@ It also removes some of the boilerplate involved in writing tests that leverage vagrant boxes. """ + from typing import Dict, List, Optional from unittest import TestCase from vagrant import Vagrant, stderr_cm diff --git a/tests/test_vagrant_test_case.py b/tests/test_vagrant_test_case.py index 43945ee..0241262 100644 --- a/tests/test_vagrant_test_case.py +++ b/tests/test_vagrant_test_case.py @@ -3,6 +3,7 @@ There are a handful of classes to try to provide multiple different varying samples of possible setups """ + import os from vagrant import Vagrant from vagrant.test import VagrantTestCase