Skip to content

Commit 631b48a

Browse files
authored
Update django.core.management.commands for Django 5.2 (#2613)
Signed-off-by: SaJH <[email protected]>
1 parent e20f512 commit 631b48a

File tree

5 files changed

+8
-11
lines changed

5 files changed

+8
-11
lines changed

Diff for: django-stubs/core/management/base.pyi

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class BaseCommand:
7070
def print_help(self, prog_name: str, subcommand: str) -> None: ...
7171
def run_from_argv(self, argv: list[str]) -> None: ...
7272
def execute(self, *args: Any, **options: Any) -> str | None: ...
73+
def get_check_kwargs(self, options: Any) -> dict[str | None, _ListOrTuple[str] | Literal["__all__"] | None]: ...
7374
def check(
7475
self,
7576
app_configs: Sequence[AppConfig] | None = None,

Diff for: django-stubs/core/management/commands/compilemessages.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ from django.core.management.base import BaseCommand
55
from django.utils._os import _PathCompatible
66

77
def has_bom(fn: Path) -> bool: ...
8-
def is_writable(path: _PathCompatible) -> bool: ...
8+
def is_dir_writable(path: _PathCompatible) -> bool: ...
99

1010
class Command(BaseCommand):
1111
program: str

Diff for: django-stubs/core/management/commands/makemigrations.pyi

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
from typing import Any
1+
from typing import Any, ClassVar
22

33
from django.core.management.base import BaseCommand, OutputWrapper
4+
from django.db.migrations.autodetector import MigrationAutodetector
45
from django.db.migrations.loader import MigrationLoader
56

67
class Command(BaseCommand):
8+
autodetector: ClassVar[type[MigrationAutodetector]]
79
verbosity: int
810
interactive: bool
911
dry_run: bool

Diff for: django-stubs/core/management/commands/migrate.pyi

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
from collections.abc import Container
2-
from typing import Any
2+
from typing import Any, ClassVar
33

44
from django.core.management.base import BaseCommand
55
from django.db.backends.base.base import BaseDatabaseWrapper
6+
from django.db.migrations.autodetector import MigrationAutodetector
67
from django.db.migrations.operations.base import Operation
78

89
class Command(BaseCommand):
10+
autodetector: ClassVar[type[MigrationAutodetector]]
911
verbosity: int
1012
interactive: bool
1113
start: float

Diff for: scripts/stubtest/allowlist_todo_django52.txt

-8
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,6 @@ django.core.mail.EmailMultiAlternatives.body_contains
8686
django.core.mail.message.EmailAlternative
8787
django.core.mail.message.EmailAttachment
8888
django.core.mail.message.EmailMultiAlternatives.body_contains
89-
django.core.management.BaseCommand.get_check_kwargs
90-
django.core.management.base.BaseCommand.get_check_kwargs
91-
django.core.management.commands.compilemessages.is_dir_writable
92-
django.core.management.commands.compilemessages.is_writable
93-
django.core.management.commands.makemigrations.Command.autodetector
94-
django.core.management.commands.migrate.Command.autodetector
95-
django.core.management.commands.migrate.Command.get_check_kwargs
96-
django.core.management.commands.runserver.Command.get_check_kwargs
9789
django.core.management.commands.shell.Command.get_auto_imports
9890
django.core.management.commands.shell.Command.get_namespace
9991
django.core.management.utils.run_formatters

0 commit comments

Comments
 (0)