11from collections .abc import Callable
22from logging import Logger
33from typing import Any , TypeVar
4- from typing_extensions import ParamSpec
4+ from typing_extensions import ParamSpec , TypeAlias
55
66from flask_sqlalchemy import SQLAlchemy
77from 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
1313alembic_version : tuple [int , int , int ]
1414log : 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