From 2614c788633d2df8859c3f8cafacc4c03020df83 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 17:01:56 +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 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks.git/compare/v4.4.0...v4.6.0) - [github.com/psf/black: 23.7.0 → 24.8.0](https://github.com/psf/black/compare/23.7.0...24.8.0) - [github.com/pycqa/flake8.git: 6.1.0 → 7.1.1](https://github.com/pycqa/flake8.git/compare/6.1.0...7.1.1) - [github.com/pre-commit/mirrors-mypy: v1.5.1 → v1.11.2](https://github.com/pre-commit/mirrors-mypy/compare/v1.5.1...v1.11.2) - [github.com/pycqa/pylint: v3.0.0a7 → v3.2.7](https://github.com/pycqa/pylint/compare/v3.0.0a7...v3.2.7) - [github.com/jazzband/pip-tools: 7.3.0 → 7.4.1](https://github.com/jazzband/pip-tools/compare/7.3.0...7.4.1) --- .pre-commit-config.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 163518b..35c5b30 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: v4.6.0 hooks: - id: end-of-file-fixer - id: trailing-whitespace @@ -29,11 +29,11 @@ repos: - id: check-merge-conflict - id: debug-statements - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 24.8.0 hooks: - id: black - repo: https://github.com/pycqa/flake8.git - rev: 6.1.0 + rev: 7.1.1 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.11.2 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: v3.2.7 hooks: - id: pylint additional_dependencies: - pytest - repo: https://github.com/jazzband/pip-tools - rev: 7.3.0 + rev: 7.4.1 hooks: - id: pip-compile entry: pip-compile --resolver=backtracking -q --no-annotate --output-file=requirements.txt pyproject.toml --extra test --strip-extras From 89b8c202471de624c5eb59226c6e641ed600a2e8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 17:04:53 +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