Update migration.pyi (#501)

* Update migration.pyi

* Fixes tests

* Fixes tests

* Fixes tests
This commit is contained in:
Nikita Sobolev
2020-10-26 11:43:47 +03:00
committed by GitHub
parent 402b7d563f
commit 40c8bfa510
5 changed files with 11 additions and 10 deletions

View File

@@ -38,7 +38,7 @@ jobs:
- name: Lint with black
python: 3.7
script: 'black --check django-stubs/'
script: 'black --check django-stubs/ setup.py'
- name: Lint plugin code with flake8
python: 3.7

View File

@@ -1,5 +1,5 @@
black
pytest-mypy-plugins==1.3.0
pytest-mypy-plugins==1.6.1
psycopg2-binary
flake8==3.7.9
flake8-pyi==19.3.0

View File

@@ -1,14 +1,15 @@
from typing import Any, List, Tuple
from typing import Tuple, List, Optional
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
from django.db.migrations.state import ProjectState
from django.db.migrations.operations.base import Operation
class Migration:
operations: List[Any] = ...
dependencies: List[Any] = ...
run_before: List[Any] = ...
replaces: List[Any] = ...
initial: Any = ...
operations: List[Operation] = ...
dependencies: List[Tuple[str, str]] = ...
run_before: List[Tuple[str, str]] = ...
replaces: List[Tuple[str, str]] = ...
initial: Optional[bool] = ...
atomic: bool = ...
name: str = ...
app_label: str = ...

View File

@@ -70,7 +70,7 @@ class ParallelTestSuite(TestSuite):
processes: Any = ...
failfast: Any = ...
def __init__(self, suite: Any, processes: Any, failfast: bool = ...) -> None: ...
def run(self, result: Any): ...
def run(self, result: Any): ... # type: ignore
class DiscoverRunner:
test_suite: Any = ...

View File

@@ -21,7 +21,7 @@ with open("README.md", "r") as f:
readme = f.read()
dependencies = [
"mypy>=0.782,<0.790",
"mypy>=0.790",
"typing-extensions",
"django",
]