mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-05-11 09:08:28 +08:00
WIP Issue 388 (#390)
* updated mypy dependency * update readme * readme update v2 * pytest-mypy-plugins newer version * updated pytest_mypy_plugins name * update ignored errors for typechecking django test suite Co-authored-by: Kacper Szmigiel <szmigielkacper@gmai.com>
This commit is contained in:
@@ -47,7 +47,9 @@ We rely on different `django` and `mypy` versions:
|
|||||||
|
|
||||||
| django-stubs | mypy version | django version | python version
|
| django-stubs | mypy version | django version | python version
|
||||||
| ------------ | ---- | ---- | ---- |
|
| ------------ | ---- | ---- | ---- |
|
||||||
| 1.3.0 | 0.750 | 2.2.x | ^3.6
|
| 1.5.0 | 0.780 | 2.2.x \|\| 3.x | ^3.6
|
||||||
|
| 1.4.0 | 0.770 | 2.2.x \|\| 3.x | ^3.6
|
||||||
|
| 1.3.0 | 0.750 | 2.2.x \|\| 3.x | ^3.6
|
||||||
| 1.2.0 | 0.730 | 2.2.x | ^3.6
|
| 1.2.0 | 0.730 | 2.2.x | ^3.6
|
||||||
| 1.1.0 | 0.720 | 2.2.x | ^3.6
|
| 1.1.0 | 0.720 | 2.2.x | ^3.6
|
||||||
| 0.12.x | old semantic analyzer (<0.711), dmypy support | 2.1.x | ^3.6
|
| 0.12.x | old semantic analyzer (<0.711), dmypy support | 2.1.x | ^3.6
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
black
|
black
|
||||||
pytest-mypy-plugins==1.2.0
|
pytest-mypy-plugins==1.3.0
|
||||||
psycopg2
|
psycopg2
|
||||||
flake8==3.7.9
|
flake8==3.7.9
|
||||||
flake8-pyi==19.3.0
|
flake8-pyi==19.3.0
|
||||||
|
|||||||
@@ -185,6 +185,8 @@ IGNORED_ERRORS = {
|
|||||||
],
|
],
|
||||||
'files': [
|
'files': [
|
||||||
'Incompatible types in assignment (expression has type "IOBase", variable has type "File")',
|
'Incompatible types in assignment (expression has type "IOBase", variable has type "File")',
|
||||||
|
'Argument 1 to "TextIOWrapper" has incompatible type "File"; expected "BinaryIO"',
|
||||||
|
'Incompatible types in assignment (expression has type "BinaryIO", variable has type "File")',
|
||||||
],
|
],
|
||||||
'filtered_relation': [
|
'filtered_relation': [
|
||||||
'has no attribute "name"',
|
'has no attribute "name"',
|
||||||
@@ -378,6 +380,7 @@ IGNORED_ERRORS = {
|
|||||||
'responses': [
|
'responses': [
|
||||||
'Argument 1 to "TextIOWrapper" has incompatible type "HttpResponse"; expected "IO[bytes]"',
|
'Argument 1 to "TextIOWrapper" has incompatible type "HttpResponse"; expected "IO[bytes]"',
|
||||||
'"FileLike" has no attribute "closed"',
|
'"FileLike" has no attribute "closed"',
|
||||||
|
'Argument 1 to "TextIOWrapper" has incompatible type "HttpResponse"; expected "BinaryIO"',
|
||||||
],
|
],
|
||||||
'reverse_lookup': [
|
'reverse_lookup': [
|
||||||
"Cannot resolve keyword 'choice' into field"
|
"Cannot resolve keyword 'choice' into field"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
from pytest_mypy.collect import File
|
from pytest_mypy_plugins.collect import File
|
||||||
from pytest_mypy.item import YamlTestItem
|
from pytest_mypy_plugins.item import YamlTestItem
|
||||||
|
|
||||||
|
|
||||||
def django_plugin_hook(test_item: YamlTestItem) -> None:
|
def django_plugin_hook(test_item: YamlTestItem) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user