Skip to content

Commit

Permalink
Update RunSQL type to include parametrized sql (#1015)
Browse files Browse the repository at this point in the history
* update RunSQL type to include parametrized sql

* fix Black formatting
  • Loading branch information
lachtanek authored Jun 24, 2022
1 parent 6440521 commit c020349
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions django-stubs/db/migrations/operations/special.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import sys
from typing import Any, Mapping, Optional, Sequence, Union
from typing import Any, Mapping, Optional, Sequence, Tuple, Union

from django.db.backends.base.schema import BaseDatabaseSchemaEditor
from django.db.migrations.state import StateApps
Expand All @@ -21,14 +21,16 @@ class SeparateDatabaseAndState(Operation):

class RunSQL(Operation):
noop: Literal[""] = ...
sql: Union[str, _ListOrTuple[str]] = ...
reverse_sql: Optional[Union[str, _ListOrTuple[str]]] = ...
sql: Union[str, _ListOrTuple[str], _ListOrTuple[Tuple[str, Optional[_ListOrTuple[str]]]]] = ...
reverse_sql: Optional[Union[str, _ListOrTuple[str], _ListOrTuple[Tuple[str, Optional[_ListOrTuple[str]]]]]] = ...
state_operations: Sequence[Operation] = ...
hints: Mapping[str, Any] = ...
def __init__(
self,
sql: Union[str, _ListOrTuple[str]],
reverse_sql: Optional[Union[str, _ListOrTuple[str]]] = ...,
sql: Union[str, _ListOrTuple[str], _ListOrTuple[Tuple[str, Optional[_ListOrTuple[str]]]]],
reverse_sql: Optional[
Union[str, _ListOrTuple[str], _ListOrTuple[Tuple[str, Optional[_ListOrTuple[str]]]]]
] = ...,
state_operations: Sequence[Operation] = ...,
hints: Optional[Mapping[str, Any]] = ...,
elidable: bool = ...,
Expand Down

0 comments on commit c020349

Please sign in to comment.