Browse code

Add mypy configuration

Joseph Weston authored on 09/11/2019 16:36:39
Showing 7 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,6 @@
1
+[mypy]
2
+follow_imports = silent
3
+ignore_missing_imports = true
4
+
5
+[mypy-tests.*]
6
+ignore_errors = true
... ...
@@ -28,6 +28,7 @@ test = [
28 28
     "pytest",
29 29
     "pytest-cov",
30 30
     "pytest-flake8",
31
+    "pytest-mypy",
31 32
     "hypothesis",
32 33
     "tox",
33 34
     "flake8-per-file-ignores",
... ...
@@ -1,3 +1,3 @@
1 1
 """Quantum gate operations"""
2 2
 
3
-__all__ = []
3
+__all__ = []  # type: ignore
... ...
@@ -1,3 +1,3 @@
1 1
 """Quantum measurements"""
2 2
 
3
-__all__ = []
3
+__all__ = []  # type: ignore
... ...
@@ -10,7 +10,7 @@ by the associated classical bitstring.
10 10
 
11 11
 import numpy as np
12 12
 
13
-__all__ = ["from_classical"]
13
+__all__ = ["from_classical"]  # type: ignore
14 14
 
15 15
 
16 16
 def from_classical(bitstring):
17 17
new file mode 100644
... ...
@@ -8,7 +8,8 @@ python =
8 8
   3.7: clean,py37,report
9 9
 
10 10
 [pytest]
11
-addopts = --flake8 --cov --cov-append --cov-report term-missing
11
+addopts = --mypy --flake8 --cov --cov-append --cov-report term-missing
12
+testpaths = qsim tests
12 13
 
13 14
 [coverage:paths]
14 15
 source =