Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add mypy to travis configuration

IKarbowiak796403711b56
diff --git a/.travis.yml b/.travis.yml
index f92bffb6f2..1cff12e6f4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -47,6 +47,8 @@ matrix:
python: "3.8"
- env: TOXENV=flake8
python: "3.8"
+ - env: TOXENV=mypy
+ python: "3.8"
- env: TOXENV=check_gql_schema
python: "3.8"
- env: TOXENV=check_migrations
diff --git a/tox.ini b/tox.ini
index 622c92db12..707018a5a8 100644
--- a/tox.ini
+++ b/tox.ini
@@ -35,6 +35,14 @@ whitelist_externals = sh
commands =
sh -c 'find saleor -name "*.py" -type f | xargs pydocstyle -v'
+[testenv:mypy]
+basepython = python3.8
+deps =
+ mypy>=0.740
+ django-stubs>=1.2
+commands =
+ mypy saleor
+
[testenv:check_gql_schema]
basepython = python3.8
whitelist_externals = sh