mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-08 21:14:49 +08:00
enable two more test folders
This commit is contained in:
@@ -74,9 +74,9 @@ class IndexOperation(Operation):
|
|||||||
class AddIndex(IndexOperation):
|
class AddIndex(IndexOperation):
|
||||||
model_name: str = ...
|
model_name: str = ...
|
||||||
index: Index = ...
|
index: Index = ...
|
||||||
def __init__(self, model_name: str, index: Index) -> None: ...
|
def __init__(self, model_name: str, index: Union[str, Index]) -> None: ...
|
||||||
|
|
||||||
class RemoveIndex(IndexOperation):
|
class RemoveIndex(IndexOperation):
|
||||||
model_name: str = ...
|
model_name: str = ...
|
||||||
name: str = ...
|
name: str = ...
|
||||||
def __init__(self, model_name: str, name: str) -> None: ...
|
def __init__(self, model_name: str, name: Union[str, Index]) -> None: ...
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ class SmallIntegerField(IntegerField): ...
|
|||||||
class BigIntegerField(IntegerField): ...
|
class BigIntegerField(IntegerField): ...
|
||||||
|
|
||||||
class FloatField(Field):
|
class FloatField(Field):
|
||||||
|
def __set__(self, instance, value: Union[float, int, Combinable]) -> float: ...
|
||||||
def __get__(self, instance, owner) -> float: ...
|
def __get__(self, instance, owner) -> float: ...
|
||||||
|
|
||||||
class DecimalField(Field):
|
class DecimalField(Field):
|
||||||
@@ -99,6 +100,7 @@ class DecimalField(Field):
|
|||||||
validators: Iterable[_ValidatorCallable] = ...,
|
validators: Iterable[_ValidatorCallable] = ...,
|
||||||
error_messages: Optional[_ErrorMessagesToOverride] = ...,
|
error_messages: Optional[_ErrorMessagesToOverride] = ...,
|
||||||
): ...
|
): ...
|
||||||
|
def __set__(self, instance, value: Union[str, Combinable]) -> decimal.Decimal: ...
|
||||||
def __get__(self, instance, owner) -> decimal.Decimal: ...
|
def __get__(self, instance, owner) -> decimal.Decimal: ...
|
||||||
|
|
||||||
class AutoField(Field):
|
class AutoField(Field):
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ check_untyped_defs = True
|
|||||||
warn_no_return = False
|
warn_no_return = False
|
||||||
show_traceback = True
|
show_traceback = True
|
||||||
warn_redundant_casts = True
|
warn_redundant_casts = True
|
||||||
|
allow_redefinition = True
|
||||||
|
|
||||||
plugins =
|
plugins =
|
||||||
mypy_django_plugin.main
|
mypy_django_plugin.main
|
||||||
|
|||||||
@@ -194,6 +194,7 @@ IGNORED_ERRORS = {
|
|||||||
+ 'expected "Optional[Sequence[Union[Type[Model], str]]]"',
|
+ 'expected "Optional[Sequence[Union[Type[Model], str]]]"',
|
||||||
'Argument 1 to "RunPython" has incompatible type "str"; expected "Callable[..., Any]"',
|
'Argument 1 to "RunPython" has incompatible type "str"; expected "Callable[..., Any]"',
|
||||||
'FakeLoader',
|
'FakeLoader',
|
||||||
|
'Argument 1 to "append" of "list" has incompatible type "AddIndex"; expected "CreateModel"'
|
||||||
],
|
],
|
||||||
'queryset_pickle': [
|
'queryset_pickle': [
|
||||||
'"None" has no attribute "somefield"'
|
'"None" has no attribute "somefield"'
|
||||||
@@ -412,10 +413,8 @@ TESTS_DIRS = [
|
|||||||
# TODO: 'middleware_exceptions',
|
# TODO: 'middleware_exceptions',
|
||||||
'migrate_signals',
|
'migrate_signals',
|
||||||
'migration_test_data_persistence',
|
'migration_test_data_persistence',
|
||||||
# wait for redefinitions
|
'migrations',
|
||||||
# TODO: 'migrations',
|
|
||||||
'migrations2',
|
'migrations2',
|
||||||
# waits for allow redefinitions
|
|
||||||
# TODO: 'model_fields',
|
# TODO: 'model_fields',
|
||||||
# TODO: 'model_forms',
|
# TODO: 'model_forms',
|
||||||
'model_formsets',
|
'model_formsets',
|
||||||
@@ -493,8 +492,7 @@ TESTS_DIRS = [
|
|||||||
'transactions',
|
'transactions',
|
||||||
'unmanaged_models',
|
'unmanaged_models',
|
||||||
|
|
||||||
# wait for "allow redefinitions" here
|
'update',
|
||||||
# TODO: 'update',
|
|
||||||
|
|
||||||
'update_only_fields',
|
'update_only_fields',
|
||||||
'urlpatterns',
|
'urlpatterns',
|
||||||
|
|||||||
Reference in New Issue
Block a user