Fix build.gradle again. This time run mypy in pipenv. Also make it the first command to be run in pytest task since it's faster to detect errors.
@@ -40,6 +40,9 @@ task installDependencies {
}
task pytest {
doLast {
+ exec {
+ commandLine 'pipenv', 'run', 'mypy', '--ignore-missing-imports', 'keanu', 'tests'
+ }
exec {
// workaround for bug: this hits an NSP error if it's not run first
commandLine 'pipenv', 'run', 'pytest', 'tests/test_gradient_optimization.py'
@@ -54,9 +57,6 @@ task pytest {
exec {
commandLine 'pipenv', 'run', 'pytest', '--doctest-modules', 'keanu'
}
- exec {
- commandLine 'mypy', '--ignore-missing-imports', 'keanu', 'tests'
- }
}
}
