Skip to content

Commit 36d7a60

Browse files
committed
implement type-hints for all our functions
as a first step, we'll ad mypy static analyzer to check those. This should give us extra (offline) guarantees about those types.
1 parent 8ccc06c commit 36d7a60

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ venv-*/
1818
.python-version
1919
python3.6.core
2020
man/*.gz
21+
.mypy_cache/

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
[metadata]
22
description-file = README.md
33

4+
[mypy]
5+
python_version = 3.6
6+
47
[tool:pytest]
58
addopts = -v -x -rs --ignore=setup.py --pep8 --cov-report term-missing --cov=libiocage/lib libiocage/lib libiocage/tests
69
pep8maxlinelength = 80

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,5 @@
6464
]
6565
},
6666
data_files=_data,
67-
tests_require=['pytest', 'pytest-cov', 'pytest-pep8']
67+
tests_require=['pytest', 'pytest-cov', 'pytest-pep8', 'mypy']
6868
)

0 commit comments

Comments
 (0)