Skip to content

Commit 030359c

Browse files
committed
Update stubs
1 parent 37e771a commit 030359c

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

stubs/Flask-Migrate/flask_migrate/__init__.pyi

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
from collections.abc import Callable
22
from logging import Logger
33
from typing import Any, TypeVar
4-
from typing_extensions import ParamSpec
4+
from typing_extensions import ParamSpec, TypeAlias
55

66
from flask_sqlalchemy import SQLAlchemy
77
from sqlalchemy import MetaData
88

99
_T = TypeVar("_T")
1010
_P = ParamSpec("_P")
11-
_App = Any # flask.Flask is not possible as a dependency yet
11+
_App: TypeAlias = Any # flask.Flask is not possible as a dependency yet
1212

1313
alembic_version: tuple[int, int, int]
1414
log: Logger
@@ -32,8 +32,26 @@ class Migrate:
3232
db: SQLAlchemy | None
3333
directory: str
3434
alembic_ctx_kwargs: dict[str, Any]
35-
def __init__(self, app: _App | None = ..., db: SQLAlchemy | None = ..., directory: str = ..., **kwargs) -> None: ...
36-
def init_app(self, app: _App, db: SQLAlchemy | None = ..., directory: str | None = ..., **kwargs) -> None: ...
35+
def __init__(
36+
self,
37+
app: _App | None = ...,
38+
db: SQLAlchemy | None = ...,
39+
directory: str = ...,
40+
command: str = ...,
41+
compare_type: bool = ...,
42+
render_as_batch: bool = ...,
43+
**kwargs,
44+
) -> None: ...
45+
def init_app(
46+
self,
47+
app: _App,
48+
db: SQLAlchemy | None = ...,
49+
directory: str | None = ...,
50+
command: str | None = ...,
51+
compare_type: bool | None = ...,
52+
render_as_batch: bool | None = ...,
53+
**kwargs,
54+
) -> None: ...
3755
def configure(self, f: Callable[[Config], None]) -> Callable[[Config], None]: ...
3856
def call_configure_callbacks(self, config: Config): ...
3957
def get_config(self, directory: str | None = ..., x_arg: tuple[str] | None = ..., opts: list[str] | None = ...): ...

0 commit comments

Comments
 (0)