mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Replace Any with Incomplete in many places (#9565)
This commit is contained in:
@@ -72,7 +72,7 @@ def declarative_base(
|
||||
def declarative_base(
|
||||
bind: Connectable | None,
|
||||
metadata: MetaData | None,
|
||||
mapper: Any | None,
|
||||
mapper: Incomplete | None,
|
||||
cls: type[Any] | tuple[type[Any], ...],
|
||||
name: str,
|
||||
constructor: Callable[..., None],
|
||||
@@ -109,7 +109,11 @@ class registry:
|
||||
) -> _DeclT: ...
|
||||
@overload
|
||||
def generate_base(
|
||||
self, mapper: Any | None, cls: type[Any] | tuple[type[Any], ...], name: str, metaclass: _DeclarativeBaseMeta[_DeclT]
|
||||
self,
|
||||
mapper: Incomplete | None,
|
||||
cls: type[Any] | tuple[type[Any], ...],
|
||||
name: str,
|
||||
metaclass: _DeclarativeBaseMeta[_DeclT],
|
||||
) -> type[_DeclarativeBase]: ...
|
||||
def mapped(self, cls: _ClsT) -> _ClsT: ...
|
||||
# Return type of the callable is a _DeclarativeBase class with the passed in class as base.
|
||||
|
||||
@@ -191,7 +191,7 @@ class Values(Generative, FromClause):
|
||||
name: Any
|
||||
literal_binds: Any
|
||||
def __init__(self, *columns, **kw) -> None: ...
|
||||
def alias(self: Self, name: Any | None, **kw) -> Self: ... # type: ignore[override]
|
||||
def alias(self: Self, name: Incomplete | None, **kw) -> Self: ... # type: ignore[override]
|
||||
def lateral(self: Self, name: Incomplete | None = ...) -> Self: ...
|
||||
def data(self: Self, values) -> Self: ...
|
||||
|
||||
@@ -261,10 +261,10 @@ class GenerativeSelect(DeprecatedSelectBaseGenerations, SelectBase):
|
||||
def get_label_style(self): ...
|
||||
def set_label_style(self, style): ...
|
||||
def apply_labels(self): ...
|
||||
def limit(self: Self, limit: Any | None) -> Self: ...
|
||||
def fetch(self: Self, count: Any | None, with_ties: bool = ..., percent: bool = ...) -> Self: ...
|
||||
def offset(self: Self, offset: Any | None) -> Self: ...
|
||||
def slice(self: Self, start: Any | None, stop: Any | None) -> Self: ...
|
||||
def limit(self: Self, limit: Incomplete | None) -> Self: ...
|
||||
def fetch(self: Self, count: Incomplete | None, with_ties: bool = ..., percent: bool = ...) -> Self: ...
|
||||
def offset(self: Self, offset: Incomplete | None) -> Self: ...
|
||||
def slice(self: Self, start: Incomplete | None, stop: Incomplete | None) -> Self: ...
|
||||
def order_by(self: Self, *clauses) -> Self: ...
|
||||
def group_by(self: Self, *clauses) -> Self: ...
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from ._compat_py3k import asynccontextmanager as asynccontextmanager
|
||||
from ._concurrency_py3k import (
|
||||
@@ -10,4 +10,4 @@ from ._concurrency_py3k import (
|
||||
)
|
||||
|
||||
have_greenlet: bool
|
||||
asyncio: Any | None
|
||||
asyncio: Incomplete | None
|
||||
|
||||
Reference in New Issue
Block a user