Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update stubs
  • Loading branch information
kasium committed Nov 22, 2022
commit 030359caab05592c4e7c45c0044a6024c7801dec
26 changes: 22 additions & 4 deletions stubs/Flask-Migrate/flask_migrate/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from collections.abc import Callable
Comment thread
AlexWaygood marked this conversation as resolved.
Outdated
from logging import Logger
from typing import Any, TypeVar
from typing_extensions import ParamSpec
from typing_extensions import ParamSpec, TypeAlias

from flask_sqlalchemy import SQLAlchemy
from sqlalchemy import MetaData

_T = TypeVar("_T")
_P = ParamSpec("_P")
_App = Any # flask.Flask is not possible as a dependency yet
_App: TypeAlias = Any # flask.Flask is not possible as a dependency yet

alembic_version: tuple[int, int, int]
log: Logger
Expand All @@ -32,8 +32,26 @@ class Migrate:
db: SQLAlchemy | None
directory: str
alembic_ctx_kwargs: dict[str, Any]
def __init__(self, app: _App | None = ..., db: SQLAlchemy | None = ..., directory: str = ..., **kwargs) -> None: ...
def init_app(self, app: _App, db: SQLAlchemy | None = ..., directory: str | None = ..., **kwargs) -> None: ...
def __init__(
self,
app: _App | None = ...,
db: SQLAlchemy | None = ...,
directory: str = ...,
command: str = ...,
compare_type: bool = ...,
render_as_batch: bool = ...,
**kwargs,
) -> None: ...
def init_app(
self,
app: _App,
db: SQLAlchemy | None = ...,
directory: str | None = ...,
command: str | None = ...,
compare_type: bool | None = ...,
render_as_batch: bool | None = ...,
**kwargs,
) -> None: ...
def configure(self, f: Callable[[Config], None]) -> Callable[[Config], None]: ...
def call_configure_callbacks(self, config: Config): ...
def get_config(self, directory: str | None = ..., x_arg: tuple[str] | None = ..., opts: list[str] | None = ...): ...
Comment thread
kasium marked this conversation as resolved.
Outdated
Expand Down