Skip to content
Merged
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
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ repos:
- flake8-2020>=1.6.1
- flake8-docstrings>=1.6.0
- flake8-pytest-style>=1.6.0
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.931
hooks:
- id: mypy
# empty args needed in order to match mypy cli behavior
# args: [--strict]
- repo: https://github.com/pycqa/pylint
rev: v2.12.2
hooks:
Expand Down
13 changes: 13 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[mypy]
python_version = 3.8
color_output = True
error_summary = True
; disallow_untyped_calls = True
; disallow_untyped_defs = True
; disallow_any_generics = True
; disallow_any_unimported = True
; warn_redundant_casts = True
; warn_return_any = True
; warn_unused_configs = True
# site-packages is here to help vscode mypy integration getting confused
exclude = (build|test/local-content|site-packages)
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ python_requires = >=3.8
[options.extras_require]
test =
pytest>=7.0.0

[options.package_data]
vagrant = py.typed
Empty file added vagrant/py.typed
Empty file.
5 changes: 3 additions & 2 deletions vagrant/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
It also removes some of the boilerplate involved in writing tests that leverage
vagrant boxes.
"""
from typing import Dict, List
from unittest import TestCase
from vagrant import Vagrant, stderr_cm

Expand All @@ -20,11 +21,11 @@ class VagrantTestCase(TestCase):
will remain up. Defaults to False
"""

vagrant_boxes = []
vagrant_boxes: List[str] = []
vagrant_root = None
restart_boxes = False

__initial_box_statuses = {}
__initial_box_statuses: Dict[str, str] = {}
__cleanup_actions = {
Vagrant.NOT_CREATED: "destroy",
Vagrant.POWEROFF: "halt",
Expand Down