fix ci typecheck tests

This commit is contained in:
Maxim Kurnikov
2019-01-05 19:32:32 +03:00
parent dbf6538795
commit c4e8f09ed1
5 changed files with 5 additions and 7 deletions

3
.gitignore vendored
View File

@@ -4,4 +4,5 @@ out/
/test_sqlite.py /test_sqlite.py
/django /django
.idea/ .idea/
.mypy_cache/ .mypy_cache/
django-sources

View File

@@ -21,8 +21,7 @@ jobs:
- name: "Typecheck Django test suite" - name: "Typecheck Django test suite"
python: 3.7 python: 3.7
script: | script: |
cd scripts ./scripts/typecheck_django_tests.xsh
./typecheck_django_tests.xsh
before_install: | before_install: |
# Upgrade pip, setuptools, and wheel # Upgrade pip, setuptools, and wheel

1
scripts/.gitignore vendored
View File

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

View File

@@ -5,10 +5,9 @@ if not os.path.exists('./django-sources'):
git clone -b stable/2.1.x https://github.com/django/django.git django-sources git clone -b stable/2.1.x https://github.com/django/django.git django-sources
ignored_error_patterns = ["Need type annotation for"] ignored_error_patterns = ["Need type annotation for"]
for line in $(mypy --config-file typecheck_tests.ini ./django-sources/tests/files).split('\n'): for line in $(mypy --config-file ./scripts/mypy.ini ./django-sources/tests/files).split('\n'):
for pattern in ignored_error_patterns: for pattern in ignored_error_patterns:
if pattern in line: if pattern in line:
break break
else: else:
print(line) print(line)