Add a mypy.ini file and enable some more warnings.

Also require all Python functions to have a type declaration.
This commit is contained in:
Jakob Stoklund Olesen
2017-03-30 19:52:06 -07:00
parent fc979c474f
commit 98ecebd85b
4 changed files with 15 additions and 8 deletions

View File

@@ -60,7 +60,7 @@ def decode_interval(intv, full_range, default=None):
"""
if isinstance(intv, tuple):
# mypy buig here: 'builtins.None' object is not iterable
lo, hi = intv # type: ignore
lo, hi = intv
assert is_power_of_two(lo)
assert is_power_of_two(hi)
assert lo <= hi