Skip to content

Commit

Permalink
Travis: include mypy tests for static type checking in Python
Browse files Browse the repository at this point in the history
This uses the mypy configuration contributed by @pgunn to run static
type checks on our Python codebase. For now, the tests are only run to
display potential problems, but they don't have an effect on the test
results.
  • Loading branch information
tomka committed Jan 2, 2019
1 parent 7d02dd4 commit 00c4f12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ script:
- cd django/applications/catmaid/static/css
- $TRAVIS_BUILD_DIR/node_modules/.bin/csslint .
- cd $TRAVIS_BUILD_DIR
# Static type checking for Python, for now only as warning and when mypy is
# available (which it isn't in PyPy).
- if [ -x "$(command -v mypy)" ]; then mypy --config-file mypy.ini django/ || true; fi
- cd django/projects
- python manage.py migrate --noinput
- python manage.py collectstatic --link --noinput
Expand Down
1 change: 1 addition & 0 deletions django/requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
django-migration-testcase==0.0.13
selenium==3.141.0
sauceclient==1.0.0
mypy==0.650; platform_python_implementation != 'PyPy'

0 comments on commit 00c4f12

Please sign in to comment.