Skip to content

Commit 3cdb3fb

Browse files
Add mypy to travis and as a dev dependency
1 parent a8e00e0 commit 3cdb3fb

3 files changed

Lines changed: 19 additions & 2 deletions

File tree

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ install:
1313

1414
script:
1515
- py.test --doctest-modules --cov=doi src tests
16+
- mypy src/ tests
1617
after_success:
1718
- coveralls

setup.cfg

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,18 @@ exclude = docs
77
[tool:pytest]
88
collect_ignore = ['setup.py']
99

10+
[mypy]
11+
disallow_redefinition = True
12+
warn_unused_configs = True
13+
disallow_any_generics = True
14+
disallow_subclassing_any = True
15+
disallow_untyped_calls = True
16+
disallow_untyped_defs = True
17+
disallow_incomplete_defs = True
18+
check_untyped_defs = True
19+
disallow_untyped_decorators = True
20+
no_implicit_optional = True
21+
warn_redundant_casts = True
22+
warn_unused_ignores = True
23+
warn_return_any = True
24+
no_implicit_reexport = True

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ def get_version(filename):
2222

2323
dev_requirements = [
2424
'coverage', 'pytest', 'pytest-cov==2.5.0', 'twine', 'pep8',
25-
'flake8', 'wheel',
26-
'sphinx', 'sphinx-autobuild', 'sphinx-autodoc-typehints', 'sphinx_rtd_theme']
25+
'flake8', 'wheel', 'mypy',
26+
'sphinx', 'sphinx-autobuild', 'sphinx-autodoc-typehints',
27+
'sphinx_rtd_theme']
2728

2829
version = get_version('./src/doi/__init__.py')
2930

0 commit comments

Comments
 (0)