mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-19 02:15:59 +08:00
black reformat, some fixes
This commit is contained in:
@@ -28,7 +28,9 @@ class MigrationAutodetector:
|
||||
def only_relation_agnostic_fields(
|
||||
self, fields: List[Tuple[str, Field]]
|
||||
) -> List[Tuple[str, List[Any], Dict[str, Union[Callable, int, str]]]]: ...
|
||||
def check_dependency(self, operation: Operation, dependency: Tuple[str, str, Optional[str], Union[bool, str]]) -> bool: ...
|
||||
def check_dependency(
|
||||
self, operation: Operation, dependency: Tuple[str, str, Optional[str], Union[bool, str]]
|
||||
) -> bool: ...
|
||||
def add_operation(
|
||||
self,
|
||||
app_label: str,
|
||||
|
||||
@@ -37,4 +37,6 @@ class MigrationExecutor:
|
||||
) -> ProjectState: ...
|
||||
def unapply_migration(self, state: ProjectState, migration: Migration, fake: bool = ...) -> ProjectState: ...
|
||||
def check_replacements(self) -> None: ...
|
||||
def detect_soft_applied(self, project_state: Optional[ProjectState], migration: Migration) -> Tuple[bool, ProjectState]: ...
|
||||
def detect_soft_applied(
|
||||
self, project_state: Optional[ProjectState], migration: Migration
|
||||
) -> Tuple[bool, ProjectState]: ...
|
||||
|
||||
@@ -2,7 +2,12 @@
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from .fields import AddField as AddField, AlterField as AlterField, RemoveField as RemoveField, RenameField as RenameField
|
||||
from .fields import (
|
||||
AddField as AddField,
|
||||
AlterField as AlterField,
|
||||
RemoveField as RemoveField,
|
||||
RenameField as RenameField,
|
||||
)
|
||||
from .models import (
|
||||
AddIndex as AddIndex,
|
||||
AlterIndexTogether as AlterIndexTogether,
|
||||
|
||||
@@ -87,7 +87,9 @@ class ModelOptionOperation(ModelOperation):
|
||||
def reduce(self, operation: Operation, in_between: List[DeleteModel], app_label: str = ...) -> bool: ...
|
||||
|
||||
class FieldRelatedOptionOperation(ModelOptionOperation):
|
||||
def reduce(self, operation: Operation, in_between: List[Any], app_label: str = ...) -> Union[List[Operation], bool]: ...
|
||||
def reduce(
|
||||
self, operation: Operation, in_between: List[Any], app_label: str = ...
|
||||
) -> Union[List[Operation], bool]: ...
|
||||
|
||||
class AlterUniqueTogether(FieldRelatedOptionOperation):
|
||||
option_name: str = ...
|
||||
|
||||
@@ -10,7 +10,10 @@ class MigrationQuestioner:
|
||||
specified_apps: Set[Any] = ...
|
||||
dry_run: None = ...
|
||||
def __init__(
|
||||
self, defaults: Optional[Dict[str, bool]] = ..., specified_apps: Optional[Set[str]] = ..., dry_run: Optional[bool] = ...
|
||||
self,
|
||||
defaults: Optional[Dict[str, bool]] = ...,
|
||||
specified_apps: Optional[Set[str]] = ...,
|
||||
dry_run: Optional[bool] = ...,
|
||||
) -> None: ...
|
||||
def ask_initial(self, app_label: str) -> bool: ...
|
||||
def ask_not_null_addition(self, field_name: str, model_name: str) -> None: ...
|
||||
|
||||
@@ -75,7 +75,9 @@ class StateApps:
|
||||
ready: bool
|
||||
real_models: List[django.db.migrations.state.ModelState]
|
||||
stored_app_configs: List[Any]
|
||||
def __init__(self, real_apps: List[str], models: Dict[Tuple[str, str], ModelState], ignore_swappable: bool = ...) -> None: ...
|
||||
def __init__(
|
||||
self, real_apps: List[str], models: Dict[Tuple[str, str], ModelState], ignore_swappable: bool = ...
|
||||
) -> None: ...
|
||||
def bulk_update(self) -> Iterator[None]: ...
|
||||
def clone(self) -> StateApps: ...
|
||||
def render_multiple(self, model_states: List[ModelState]) -> None: ...
|
||||
|
||||
@@ -3,4 +3,6 @@ from typing import Any, Dict, Iterator, List, Optional, Set
|
||||
from django.db.migrations.operations.base import Operation
|
||||
|
||||
def topological_sort_as_sets(dependency_graph: Dict[Operation, Set[Operation]]) -> Iterator[Set[Operation]]: ...
|
||||
def stable_topological_sort(l: List[Operation], dependency_graph: Dict[Operation, Set[Operation]]) -> List[Operation]: ...
|
||||
def stable_topological_sort(
|
||||
l: List[Operation], dependency_graph: Dict[Operation, Set[Operation]]
|
||||
) -> List[Operation]: ...
|
||||
|
||||
Reference in New Issue
Block a user