diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 163518b..3bc47bd 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: v5.0.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.10.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.14.1 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.3.3 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 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