diff --git a/oslo.{{cookiecutter.module_name}}/.gitignore b/oslo.{{cookiecutter.module_name}}/.gitignore index e12ea21..61bba41 100644 --- a/oslo.{{cookiecutter.module_name}}/.gitignore +++ b/oslo.{{cookiecutter.module_name}}/.gitignore @@ -34,8 +34,12 @@ lib64 pip-log.txt # Unit test / coverage reports -.coverage +cover/ +.mypy.cache/ +.coverage* .tox +stestr +.venv # Translations *.mo @@ -50,3 +54,8 @@ doc/build # pbr generates these AUTHORS ChangeLog + +# reno build +releasenotes/build +RELEASENOTES.rst +releasenotes/notes/reno.cache diff --git a/oslo.{{cookiecutter.module_name}}/lower-constraints.txt b/oslo.{{cookiecutter.module_name}}/lower-constraints.txt index 85ada21..e820647 100644 --- a/oslo.{{cookiecutter.module_name}}/lower-constraints.txt +++ b/oslo.{{cookiecutter.module_name}}/lower-constraints.txt @@ -4,4 +4,5 @@ Babel==1.3.0 hacking==0.10.0 +mypy==0.720 oslotest==1.5.1 diff --git a/oslo.{{cookiecutter.module_name}}/setup.cfg b/oslo.{{cookiecutter.module_name}}/setup.cfg index 857913c..65d5b90 100644 --- a/oslo.{{cookiecutter.module_name}}/setup.cfg +++ b/oslo.{{cookiecutter.module_name}}/setup.cfg @@ -38,3 +38,15 @@ input_file = oslo.{{cookiecutter.module_name}}/locale/oslo.{{cookiecutter.module keywords = _ gettext ngettext l_ lazy_gettext mapping_file = babel.cfg output_file = oslo.{{cookiecutter.module_name}}/locale/oslo.{{cookiecutter.module_name}}.pot + +[mypy] +show_column_numbers = true +show_error_context = true +ignore_missing_imports = true +follow_imports = skip +incremental = true +check_untyped_defs = true +warn_unused_ignores = true + +[mypy-oslo_{{ cookiecutter.module_name }}.tests.*] +ignore_errors = true diff --git a/oslo.{{cookiecutter.module_name}}/test-requirements.txt b/oslo.{{cookiecutter.module_name}}/test-requirements.txt index 9bdae47..65ba07b 100644 --- a/oslo.{{cookiecutter.module_name}}/test-requirements.txt +++ b/oslo.{{cookiecutter.module_name}}/test-requirements.txt @@ -3,5 +3,6 @@ # process, which may cause wedges in the gate later. hacking<0.11,>=0.10.0 +mypy>=0.720 # MIT oslotest>=1.5.1 stestr>=2.0.0 # Apache-2.0 diff --git a/oslo.{{cookiecutter.module_name}}/tox.ini b/oslo.{{cookiecutter.module_name}}/tox.ini index a99ce65..a0f95ba 100644 --- a/oslo.{{cookiecutter.module_name}}/tox.ini +++ b/oslo.{{cookiecutter.module_name}}/tox.ini @@ -44,6 +44,10 @@ deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt +[testenv:mypy] +commands = + mypy oslo_{{ cookiecutter.module_name }} + [testenv:debug] commands = oslo_debug_helper {posargs}