diff --git a/.travis.yml b/.travis.yml index 3c233c388f43b5b0da642e848eec4ca6ed062bbb..26694aaaf580e3e50c5b4e1225f26dd5c932d8bd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,13 +35,13 @@ install: # Install project dependencies - pip install -r requirements.txt - # Install test dependencies - - pip install flake8 - # Run the tests script: # Run python code style checks - - flake8 opentech --ignore=E501,F405 --exclude=*/migrations/* + - flake8 + + # Type check the project + - mypy . # Run system checks - python manage.py check diff --git a/requirements.txt b/requirements.txt index 77bc48b15c9cfe9bd91a4621f56e342a6e0ce67f..62cc28d588b9785c386fc88336b4cca8b2fe556c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,6 +7,8 @@ Werkzeug==0.11.11 stellar==0.4.3 wagtail-django-recaptcha==0.1 uwsgidecorators==1.1.0 +mypy==0.550 +flake8 # Production dependencies dj-database-url==0.4.1 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000000000000000000000000000000000000..14a4da3a3fbb150221868f459f2ab8d9ad8631b4 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,14 @@ +[mypy] +show_column_numbers = True +ignore_missing_imports = True + +[mypy-opentech.*] +ignore_errors = True + +[mypy-opentech.apply.*] +check_untyped_defs = True +ignore_errors = False + +[flake8] + ignore=E501,F405 + exclude=*/migrations/* \ No newline at end of file