mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-07 20:54:29 +08:00
fix ci typecheck tests
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -4,4 +4,5 @@ out/
|
|||||||
/test_sqlite.py
|
/test_sqlite.py
|
||||||
/django
|
/django
|
||||||
.idea/
|
.idea/
|
||||||
.mypy_cache/
|
.mypy_cache/
|
||||||
|
django-sources
|
||||||
@@ -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
1
scripts/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
django-sources/
|
|
||||||
@@ -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)
|
||||||
|
|
||||||
Reference in New Issue
Block a user