mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-11 06:21:58 +08:00
Fix AlterModelManagers managers annotation to be [(str, Manager), ...] (#966)
Django generates AlterModelManagers with Sequence[Tuple[str, Manager]] arguments — not Sequence[Manager] — as shown by their tests[^1]. [^1]: https://github.com/django/django/blob/4.0.4/tests/migrations/test_operations.py#L3792-L3799 Closes #965.
This commit is contained in:
@@ -88,8 +88,8 @@ class AlterModelOptions(ModelOptionOperation):
|
||||
def __init__(self, name: str, options: Dict[str, Any]) -> None: ...
|
||||
|
||||
class AlterModelManagers(ModelOptionOperation):
|
||||
managers: Sequence[Manager] = ...
|
||||
def __init__(self, name: str, managers: Sequence[Manager]) -> None: ...
|
||||
managers: Sequence[Tuple[str, Manager]] = ...
|
||||
def __init__(self, name: str, managers: Sequence[Tuple[str, Manager]]) -> None: ...
|
||||
|
||||
class IndexOperation(Operation):
|
||||
option_name: str = ...
|
||||
|
||||
Reference in New Issue
Block a user