mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Flask-SQLAlchemy: Make model query non-generic (#8455)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
from re import Pattern
|
||||
from typing import Any, Generic, TypeVar
|
||||
from typing import Any
|
||||
|
||||
from sqlalchemy import Table
|
||||
from sqlalchemy.ext.declarative import DeclarativeMeta
|
||||
from sqlalchemy.orm import Query
|
||||
|
||||
_ModelT = TypeVar("_ModelT")
|
||||
|
||||
def should_set_tablename(cls: type) -> bool: ...
|
||||
|
||||
camelcase_re: Pattern[str]
|
||||
@@ -22,6 +20,6 @@ class BindMetaMixin(type):
|
||||
|
||||
class DefaultMeta(NameMetaMixin, BindMetaMixin, DeclarativeMeta): ...
|
||||
|
||||
class Model(Generic[_ModelT]):
|
||||
query_class: type[Query[_ModelT]] | None
|
||||
query: Query[_ModelT] | None
|
||||
class Model:
|
||||
query_class: type[Query[Any]] | None
|
||||
query: Query[Any] | None
|
||||
|
||||
Reference in New Issue
Block a user