mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-10 22:11:54 +08:00
fix problems with 0.660
This commit is contained in:
@@ -17,8 +17,6 @@ class DeclarativeFieldsMetaclass(MediaDefiningClass):
|
|||||||
def __new__(
|
def __new__(
|
||||||
mcs: Type[DeclarativeFieldsMetaclass], name: str, bases: Tuple[Type[BaseForm]], attrs: OrderedDict
|
mcs: Type[DeclarativeFieldsMetaclass], name: str, bases: Tuple[Type[BaseForm]], attrs: OrderedDict
|
||||||
) -> Type[BaseForm]: ...
|
) -> Type[BaseForm]: ...
|
||||||
@classmethod
|
|
||||||
def __prepare__(metacls: Any, name: str, bases: Tuple[Type[BaseForm]], **kwds: Any) -> OrderedDict: ...
|
|
||||||
|
|
||||||
class BaseForm:
|
class BaseForm:
|
||||||
default_renderer: Any = ...
|
default_renderer: Any = ...
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ class DebugSQLTextTestResult(TextTestResult):
|
|||||||
def stopTest(self, test: TestCase) -> None: ...
|
def stopTest(self, test: TestCase) -> None: ...
|
||||||
def addError(self, test: Any, err: Any) -> None: ...
|
def addError(self, test: Any, err: Any) -> None: ...
|
||||||
def addFailure(self, test: Any, err: Any) -> None: ...
|
def addFailure(self, test: Any, err: Any) -> None: ...
|
||||||
def printErrorList(self, flavour: str, errors: List[Tuple[TestCase, str, str]]) -> None: ...
|
|
||||||
|
|
||||||
class RemoteTestResult:
|
class RemoteTestResult:
|
||||||
events: List[Any] = ...
|
events: List[Any] = ...
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import typing
|
import typing
|
||||||
from typing import Dict, Optional
|
from typing import Dict, Optional
|
||||||
|
|
||||||
from mypy.nodes import StrExpr, MypyFile, TypeInfo, ImportedName, SymbolNode
|
from mypy.nodes import MypyFile, TypeInfo, ImportedName, SymbolNode
|
||||||
|
|
||||||
MODEL_CLASS_FULLNAME = 'django.db.models.base.Model'
|
MODEL_CLASS_FULLNAME = 'django.db.models.base.Model'
|
||||||
FOREIGN_KEY_FULLNAME = 'django.db.models.fields.related.ForeignKey'
|
FOREIGN_KEY_FULLNAME = 'django.db.models.fields.related.ForeignKey'
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ 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", "already defined on", "Cannot assign to a"]
|
ignored_error_patterns = ["Need type annotation for", "already defined on", "Cannot assign to a"]
|
||||||
for line in $(mypy --config-file ./scripts/mypy.ini ./django-sources/tests/files).split('\n'):
|
for line in $(mypy --config-file ./scripts/mypy.ini ./django-sources/tests).split('\n'):
|
||||||
for pattern in ignored_error_patterns:
|
for pattern in ignored_error_patterns:
|
||||||
if pattern in line:
|
if pattern in line:
|
||||||
break
|
break
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -28,7 +28,7 @@ setup(
|
|||||||
python_requires='>=3',
|
python_requires='>=3',
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'Django',
|
'Django',
|
||||||
'mypy @ git+https://github.com/python/mypy.git#egg=mypy-0.660+dev.a7296c4595350768ec8ecf145c23a76b6c98e8e6'
|
'mypy'
|
||||||
],
|
],
|
||||||
packages=['django-stubs', *find_packages()],
|
packages=['django-stubs', *find_packages()],
|
||||||
package_data={'django-stubs': find_stub_files('django-stubs')},
|
package_data={'django-stubs': find_stub_files('django-stubs')},
|
||||||
|
|||||||
Reference in New Issue
Block a user