typecheck django tests, allow failures

This commit is contained in:
Maxim Kurnikov
2019-01-05 19:10:23 +03:00
parent a3206e8884
commit 8a712d46b5
4 changed files with 35 additions and 2 deletions

1
scripts/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
django-sources/

View File

@@ -0,0 +1,14 @@
#!/usr/local/bin/xonsh
import os
if not os.path.exists('./django-sources'):
git clone -b stable/2.1.x https://github.com/django/django.git django-sources
ignored_error_patterns = ["Need type annotation for"]
for line in $(mypy --config-file typecheck_tests.ini ./django-sources/tests/files).split('\n'):
for pattern in ignored_error_patterns:
if pattern in line:
break
else:
print(line)

View File

@@ -0,0 +1,10 @@
[mypy]
strict_optional = False
ignore_missing_imports = True
check_untyped_defs = True
warn_no_return = False
show_traceback = True
warn_redundant_casts = True
plugins =
mypy_django_plugin.main