mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Upgrade black version (#7089)
This commit is contained in:
@@ -130,6 +130,7 @@ class AsyncAdapt_asyncpg_dbapi:
|
||||
paramstyle: str
|
||||
def __init__(self, asyncpg) -> None: ...
|
||||
def connect(self, *arg, **kw): ...
|
||||
|
||||
class Error(Exception): ...
|
||||
class Warning(Exception): ...
|
||||
class InterfaceError(Error): ...
|
||||
@@ -141,8 +142,10 @@ class AsyncAdapt_asyncpg_dbapi:
|
||||
class DataError(DatabaseError): ...
|
||||
class NotSupportedError(DatabaseError): ...
|
||||
class InternalServerError(InternalError): ...
|
||||
|
||||
class InvalidCachedStatementError(NotSupportedError):
|
||||
def __init__(self, message) -> None: ...
|
||||
|
||||
def Binary(self, value): ...
|
||||
STRING: Any
|
||||
TIMESTAMP: Any
|
||||
|
||||
@@ -104,10 +104,12 @@ class ENUM(sqltypes.NativeForEmulated, sqltypes.Enum): # type: ignore # base c
|
||||
def adapt_emulated_to_native(cls, impl, **kw): ...
|
||||
def create(self, bind: Any | None = ..., checkfirst: bool = ...) -> None: ...
|
||||
def drop(self, bind: Any | None = ..., checkfirst: bool = ...) -> None: ...
|
||||
|
||||
class EnumGenerator(DDLBase):
|
||||
checkfirst: Any
|
||||
def __init__(self, dialect, connection, checkfirst: bool = ..., **kwargs) -> None: ...
|
||||
def visit_enum(self, enum) -> None: ...
|
||||
|
||||
class EnumDropper(DDLBase):
|
||||
checkfirst: Any
|
||||
def __init__(self, dialect, connection, checkfirst: bool = ..., **kwargs) -> None: ...
|
||||
|
||||
@@ -9,6 +9,7 @@ class HSTORE(sqltypes.Indexable, sqltypes.Concatenable, sqltypes.TypeEngine):
|
||||
hashable: bool
|
||||
text_type: Any
|
||||
def __init__(self, text_type: Any | None = ...) -> None: ...
|
||||
|
||||
class Comparator(sqltypes.Indexable.Comparator, sqltypes.Concatenable.Comparator):
|
||||
def has_key(self, other): ...
|
||||
def has_all(self, other): ...
|
||||
|
||||
@@ -9,6 +9,7 @@ class JSONPathType(sqltypes.JSON.JSONPathType):
|
||||
class JSON(sqltypes.JSON):
|
||||
astext_type: Any
|
||||
def __init__(self, none_as_null: bool = ..., astext_type: Any | None = ...) -> None: ...
|
||||
|
||||
class Comparator(sqltypes.JSON.Comparator):
|
||||
@property
|
||||
def astext(self): ...
|
||||
@@ -16,6 +17,7 @@ class JSON(sqltypes.JSON):
|
||||
|
||||
class JSONB(JSON):
|
||||
__visit_name__: str
|
||||
|
||||
class Comparator(JSON.Comparator):
|
||||
def has_key(self, other): ...
|
||||
def has_all(self, other): ...
|
||||
|
||||
@@ -173,6 +173,7 @@ class Engine(Connectable, Identified):
|
||||
@property
|
||||
def driver(self): ...
|
||||
def dispose(self) -> None: ...
|
||||
|
||||
class _trans_ctx:
|
||||
conn: Connection
|
||||
transaction: Transaction
|
||||
@@ -182,6 +183,7 @@ class Engine(Connectable, Identified):
|
||||
def __exit__(
|
||||
self, type_: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
def begin(self, close_with_result: bool = ...) -> _trans_ctx: ...
|
||||
# TODO:
|
||||
# def transaction(self, callable_: Callable[Concatenate[Connection, _P], _T], *args: _P.args, **kwargs: _P.kwargs) -> _T | None: ...
|
||||
|
||||
@@ -27,10 +27,12 @@ class CompositeProperty(DescriptorProperty):
|
||||
@property
|
||||
def columns(self): ...
|
||||
def get_history(self, state, dict_, passive=...): ...
|
||||
|
||||
class CompositeBundle(orm_util.Bundle):
|
||||
property: Any
|
||||
def __init__(self, property_, expr) -> None: ...
|
||||
def create_row_processor(self, query, procs, labels): ...
|
||||
|
||||
class Comparator(PropComparator):
|
||||
__hash__: Any
|
||||
@memoized_property
|
||||
|
||||
@@ -26,7 +26,9 @@ class InstanceEvents(event.Events):
|
||||
class _EventsHold(event.RefCollection):
|
||||
class_: Any
|
||||
def __init__(self, class_) -> None: ...
|
||||
|
||||
class HoldEvents: ...
|
||||
|
||||
def remove(self, event_key) -> None: ...
|
||||
@classmethod
|
||||
def populate(cls, class_, subject) -> None: ...
|
||||
@@ -34,6 +36,7 @@ class _EventsHold(event.RefCollection):
|
||||
class _InstanceEventsHold(_EventsHold):
|
||||
all_holds: Any
|
||||
def resolve(self, class_): ...
|
||||
|
||||
class HoldInstanceEvents(_EventsHold.HoldEvents, InstanceEvents): ...
|
||||
dispatch: Any
|
||||
|
||||
@@ -53,6 +56,7 @@ class MapperEvents(event.Events):
|
||||
class _MapperEventsHold(_EventsHold):
|
||||
all_holds: Any
|
||||
def resolve(self, class_): ...
|
||||
|
||||
class HoldMapperEvents(_EventsHold.HoldEvents, MapperEvents): ...
|
||||
dispatch: Any
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ def delete_obj(base_mapper, states, uowtransaction) -> None: ...
|
||||
|
||||
class BulkUDCompileState(CompileState):
|
||||
class default_update_options(Options): ...
|
||||
|
||||
@classmethod
|
||||
def orm_pre_session_exec(cls, session, statement, params, execution_options, bind_arguments, is_reentrant_invoke): ...
|
||||
@classmethod
|
||||
|
||||
@@ -37,6 +37,7 @@ class ColumnProperty(StrategizedProperty):
|
||||
def merge(
|
||||
self, session, source_state, source_dict, dest_state, dest_dict, load, _recursive, _resolve_conflict_map
|
||||
) -> None: ...
|
||||
|
||||
class Comparator(util.MemoizedSlots, PropComparator):
|
||||
expressions: Any
|
||||
def _memoized_method___clause_element__(self): ...
|
||||
|
||||
@@ -83,6 +83,7 @@ class RelationshipProperty(StrategizedProperty):
|
||||
_legacy_inactive_history_style: bool = ...,
|
||||
) -> None: ...
|
||||
def instrument_class(self, mapper) -> None: ...
|
||||
|
||||
class Comparator(PropComparator):
|
||||
prop: Any
|
||||
def __init__(
|
||||
@@ -105,6 +106,7 @@ class RelationshipProperty(StrategizedProperty):
|
||||
def __ne__(self, other): ...
|
||||
@memoized_property
|
||||
def property(self): ...
|
||||
|
||||
def merge(
|
||||
self, session, source_state, source_dict, dest_state, dest_dict, load, _recursive, _resolve_conflict_map
|
||||
) -> None: ...
|
||||
|
||||
@@ -90,6 +90,7 @@ class SubqueryLoader(PostLoader):
|
||||
join_depth: Any
|
||||
def __init__(self, parent, strategy_key) -> None: ...
|
||||
def init_class_attribute(self, mapper) -> None: ...
|
||||
|
||||
class _SubqCollections:
|
||||
session: Any
|
||||
execution_options: Any
|
||||
@@ -99,6 +100,7 @@ class SubqueryLoader(PostLoader):
|
||||
def __init__(self, context, subq) -> None: ...
|
||||
def get(self, key, default): ...
|
||||
def loader(self, state, dict_, row) -> None: ...
|
||||
|
||||
def create_row_processor(self, context, query_entity, path, loadopt, mapper, result, adapter, populators): ...
|
||||
|
||||
class JoinedLoader(AbstractRelationshipLoader):
|
||||
@@ -122,6 +124,7 @@ class JoinedLoader(AbstractRelationshipLoader):
|
||||
|
||||
class SelectInLoader(PostLoader, util.MemoizedSlots):
|
||||
logger: Any
|
||||
|
||||
class query_info(NamedTuple):
|
||||
load_only_child: Any
|
||||
load_with_join: Any
|
||||
|
||||
@@ -162,6 +162,7 @@ class Enum(Emulated, String, SchemaType): # type: ignore # argument disparities
|
||||
def sort_key_function(self): ...
|
||||
@property
|
||||
def native(self): ...
|
||||
|
||||
class Comparator(Concatenable.Comparator): ...
|
||||
comparator_factory: Any
|
||||
def as_generic(self, allow_nulltype: bool = ...): ...
|
||||
@@ -221,15 +222,18 @@ class JSON(Indexable, TypeEngine):
|
||||
NULL: Any
|
||||
none_as_null: Any
|
||||
def __init__(self, none_as_null: bool = ...) -> None: ...
|
||||
|
||||
class JSONElementType(TypeEngine):
|
||||
def string_bind_processor(self, dialect): ...
|
||||
def string_literal_processor(self, dialect): ...
|
||||
def bind_processor(self, dialect): ...
|
||||
def literal_processor(self, dialect): ...
|
||||
|
||||
class JSONIndexType(JSONElementType): ...
|
||||
class JSONIntIndexType(JSONIndexType): ...
|
||||
class JSONStrIndexType(JSONIndexType): ...
|
||||
class JSONPathType(JSONElementType): ...
|
||||
|
||||
class Comparator(Indexable.Comparator, Concatenable.Comparator):
|
||||
def as_boolean(self): ...
|
||||
def as_string(self): ...
|
||||
@@ -250,6 +254,7 @@ class JSON(Indexable, TypeEngine):
|
||||
class ARRAY(SchemaEventTarget, Indexable, Concatenable, TypeEngine):
|
||||
__visit_name__: str
|
||||
zero_indexes: bool
|
||||
|
||||
class Comparator(Indexable.Comparator, Concatenable.Comparator):
|
||||
def contains(self, *arg, **kw) -> None: ...
|
||||
def any(self, other, operator: Any | None = ...): ...
|
||||
@@ -340,6 +345,7 @@ class BOOLEAN(Boolean):
|
||||
class NullType(TypeEngine):
|
||||
__visit_name__: str
|
||||
def literal_processor(self, dialect): ...
|
||||
|
||||
class Comparator(TypeEngine.Comparator): ...
|
||||
comparator_factory: Any
|
||||
|
||||
|
||||
@@ -72,9 +72,11 @@ class TypeDecorator(ExternalType, SchemaEventTarget, TypeEngine):
|
||||
impl: Any
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
coerce_to_is_types: Any
|
||||
|
||||
class Comparator(TypeEngine.Comparator):
|
||||
def operate(self, op, *other, **kwargs): ...
|
||||
def reverse_operate(self, op, other, **kwargs): ...
|
||||
|
||||
@property
|
||||
def comparator_factory(self): ...
|
||||
def type_engine(self, dialect): ...
|
||||
|
||||
@@ -89,11 +89,13 @@ class ColumnAdapter(ClauseAdapter):
|
||||
anonymize_labels: bool = ...,
|
||||
adapt_from_selectables: Any | None = ...,
|
||||
) -> None: ...
|
||||
|
||||
class _IncludeExcludeMapping:
|
||||
parent: Any
|
||||
columns: Any
|
||||
def __init__(self, parent, columns) -> None: ...
|
||||
def __getitem__(self, key): ...
|
||||
|
||||
def wrap(self, adapter): ...
|
||||
def traverse(self, obj): ...
|
||||
adapt_clause: Any
|
||||
|
||||
@@ -83,6 +83,7 @@ class HasMemoized:
|
||||
def __get__(self: Self, obj: None, cls: object) -> Self: ...
|
||||
@overload
|
||||
def __get__(self, obj: object, cls: object) -> _R: ...
|
||||
|
||||
@classmethod
|
||||
def memoized_instancemethod(cls, fn): ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user