mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-22 20:01:29 +08:00
Mark first argument of __[get|set|del]attr__ as str (#9245)
This commit is contained in:
@@ -236,4 +236,4 @@ class _DecodingRow:
|
||||
charset: Any
|
||||
def __init__(self, rowproxy, charset) -> None: ...
|
||||
def __getitem__(self, index): ...
|
||||
def __getattr__(self, attr): ...
|
||||
def __getattr__(self, attr: str): ...
|
||||
|
||||
@@ -5,7 +5,7 @@ class _UnpickleDispatch:
|
||||
|
||||
class _Dispatch:
|
||||
def __init__(self, parent, instance_cls: Any | None = ...) -> None: ...
|
||||
def __getattr__(self, name): ...
|
||||
def __getattr__(self, name: str): ...
|
||||
def __reduce__(self): ...
|
||||
|
||||
class _EventMeta(type):
|
||||
@@ -18,7 +18,7 @@ class _JoinedDispatcher:
|
||||
local: Any
|
||||
parent: Any
|
||||
def __init__(self, local, parent) -> None: ...
|
||||
def __getattr__(self, name): ...
|
||||
def __getattr__(self, name: str): ...
|
||||
|
||||
class dispatcher:
|
||||
dispatch: Any
|
||||
|
||||
@@ -58,7 +58,7 @@ class ExprComparator(Comparator):
|
||||
expression: Any
|
||||
hybrid: Any
|
||||
def __init__(self, cls, expression, hybrid) -> None: ...
|
||||
def __getattr__(self, key): ...
|
||||
def __getattr__(self, key: str): ...
|
||||
@_property
|
||||
def info(self): ...
|
||||
@_property
|
||||
|
||||
@@ -52,7 +52,7 @@ class QueryableAttribute(
|
||||
def operate(self, op, *other, **kwargs): ...
|
||||
def reverse_operate(self, op, other, **kwargs): ...
|
||||
def hasparent(self, state, optimistic: bool = ...): ...
|
||||
def __getattr__(self, key): ...
|
||||
def __getattr__(self, key: str): ...
|
||||
@memoized_property
|
||||
def property(self): ...
|
||||
|
||||
|
||||
@@ -28,18 +28,18 @@ class _ModuleMarker:
|
||||
|
||||
class _ModNS:
|
||||
def __init__(self, parent) -> None: ...
|
||||
def __getattr__(self, key): ...
|
||||
def __getattr__(self, key: str): ...
|
||||
|
||||
class _GetColumns:
|
||||
cls: Any
|
||||
def __init__(self, cls) -> None: ...
|
||||
def __getattr__(self, key): ...
|
||||
def __getattr__(self, key: str): ...
|
||||
|
||||
class _GetTable:
|
||||
key: Any
|
||||
metadata: Any
|
||||
def __init__(self, key, metadata) -> None: ...
|
||||
def __getattr__(self, key): ...
|
||||
def __getattr__(self, key: str): ...
|
||||
|
||||
class _class_resolver:
|
||||
cls: Any
|
||||
|
||||
@@ -61,7 +61,7 @@ class AliasedClass:
|
||||
use_mapper_path: bool = ...,
|
||||
represents_outer_join: bool = ...,
|
||||
) -> None: ...
|
||||
def __getattr__(self, key): ...
|
||||
def __getattr__(self, key: str): ...
|
||||
|
||||
class AliasedInsp(ORMEntityColumnsClauseRole, ORMFromClauseRole, sql_base.MemoizedHasCacheKey, InspectionAttr):
|
||||
mapper: Any
|
||||
@@ -96,7 +96,7 @@ class AliasedInsp(ORMEntityColumnsClauseRole, ORMFromClauseRole, sql_base.Memoiz
|
||||
class _WrapUserEntity:
|
||||
subject: Any
|
||||
def __init__(self, subject) -> None: ...
|
||||
def __getattribute__(self, name): ...
|
||||
def __getattribute__(self, name: str): ...
|
||||
|
||||
class LoaderCriteriaOption(CriteriaOption):
|
||||
root_entity: Any
|
||||
|
||||
@@ -83,6 +83,6 @@ class _ConnectionFairy:
|
||||
def record_info(self): ...
|
||||
def invalidate(self, e: Any | None = ..., soft: bool = ...) -> None: ...
|
||||
def cursor(self, *args, **kwargs): ...
|
||||
def __getattr__(self, key): ...
|
||||
def __getattr__(self, key: str): ...
|
||||
def detach(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
|
||||
@@ -13,7 +13,7 @@ class _DBProxy:
|
||||
def __init__(self, module, poolclass=..., **kw) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def __del__(self) -> None: ...
|
||||
def __getattr__(self, key): ...
|
||||
def __getattr__(self, key: str): ...
|
||||
def get_pool(self, *args, **kw): ...
|
||||
def connect(self, *args, **kw): ...
|
||||
def dispose(self, *args, **kw) -> None: ...
|
||||
|
||||
@@ -123,14 +123,14 @@ class ColumnCollection:
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self): ...
|
||||
def __getitem__(self, key): ...
|
||||
def __getattr__(self, key): ...
|
||||
def __getattr__(self, key: str): ...
|
||||
def __contains__(self, key): ...
|
||||
def compare(self, other): ...
|
||||
def __eq__(self, other): ...
|
||||
def get(self, key, default: Any | None = ...): ...
|
||||
def __setitem__(self, key, value) -> None: ...
|
||||
def __delitem__(self, key) -> None: ...
|
||||
def __setattr__(self, key, obj) -> None: ...
|
||||
def __setattr__(self, key: str, obj) -> None: ...
|
||||
def clear(self) -> None: ...
|
||||
def remove(self, column) -> None: ...
|
||||
def update(self, iter_) -> None: ...
|
||||
|
||||
@@ -422,7 +422,7 @@ class GenericTypeCompiler(TypeCompiler):
|
||||
|
||||
class StrSQLTypeCompiler(GenericTypeCompiler):
|
||||
def process(self, type_, **kw): ...
|
||||
def __getattr__(self, key): ...
|
||||
def __getattr__(self, key: str): ...
|
||||
def visit_null(self, type_, **kw): ...
|
||||
def visit_user_defined(self, type_, **kw): ...
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ class ColumnElement(
|
||||
def type(self): ...
|
||||
@HasMemoized.memoized_attribute
|
||||
def comparator(self): ...
|
||||
def __getattr__(self, key): ...
|
||||
def __getattr__(self, key: str): ...
|
||||
def operate(self, op, *other, **kwargs): ...
|
||||
def reverse_operate(self, op, other, **kwargs): ...
|
||||
@property
|
||||
@@ -310,7 +310,7 @@ class Grouping(GroupedElement, ColumnElement[Any]):
|
||||
element: Any
|
||||
type: Any
|
||||
def __init__(self, element) -> None: ...
|
||||
def __getattr__(self, attr): ...
|
||||
def __getattr__(self, attr: str): ...
|
||||
|
||||
RANGE_UNBOUNDED: Any
|
||||
RANGE_CURRENT: Any
|
||||
|
||||
@@ -66,7 +66,7 @@ class ScalarFunctionColumn(NamedColumn):
|
||||
class _FunctionGenerator:
|
||||
opts: Any
|
||||
def __init__(self, **opts) -> None: ...
|
||||
def __getattr__(self, name): ...
|
||||
def __getattr__(self, name: str): ...
|
||||
def __call__(self, *c, **kwargs): ...
|
||||
|
||||
func: Any
|
||||
|
||||
@@ -32,7 +32,7 @@ class LambdaElement(elements.ClauseElement):
|
||||
tracker_key: Any
|
||||
opts: Any
|
||||
def __init__(self, fn, role, opts=..., apply_propagate_attrs: Any | None = ...) -> None: ...
|
||||
def __getattr__(self, key): ...
|
||||
def __getattr__(self, key: str): ...
|
||||
|
||||
class DeferredLambdaElement(LambdaElement):
|
||||
lambda_args: Any
|
||||
@@ -53,7 +53,7 @@ class StatementLambdaElement(roles.AllowsLambdaRole, LambdaElement):
|
||||
class NullLambdaStatement(roles.AllowsLambdaRole, elements.ClauseElement):
|
||||
__visit_name__: str
|
||||
def __init__(self, statement) -> None: ...
|
||||
def __getattr__(self, key): ...
|
||||
def __getattr__(self, key: str): ...
|
||||
def __add__(self, other): ...
|
||||
def add_criteria(self, other, **kw): ...
|
||||
|
||||
@@ -108,7 +108,7 @@ class PyWrapper(ColumnOperators[_T], Generic[_T]):
|
||||
def __clause_element__(self): ...
|
||||
def __bool__(self) -> bool: ...
|
||||
def __nonzero__(self) -> bool: ...
|
||||
def __getattribute__(self, key): ...
|
||||
def __getattribute__(self, key: str): ...
|
||||
def __iter__(self): ...
|
||||
def __getitem__(self, key) -> ColumnOperators[_T]: ...
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ class TypeDecorator(ExternalType, SchemaEventTarget, TypeEngine):
|
||||
def comparator_factory(self): ...
|
||||
def type_engine(self, dialect): ...
|
||||
def load_dialect_impl(self, dialect): ...
|
||||
def __getattr__(self, key): ...
|
||||
def __getattr__(self, key: str): ...
|
||||
def process_literal_param(self, value, dialect) -> None: ...
|
||||
def process_bind_param(self, value, dialect) -> None: ...
|
||||
def process_result_value(self, value, dialect) -> None: ...
|
||||
|
||||
@@ -36,7 +36,7 @@ class ReconnectFixture:
|
||||
connections: Any
|
||||
is_stopped: bool
|
||||
def __init__(self, dbapi) -> None: ...
|
||||
def __getattr__(self, key): ...
|
||||
def __getattr__(self, key: str): ...
|
||||
def connect(self, *args, **kwargs): ...
|
||||
def shutdown(self, stop: bool = ...) -> None: ...
|
||||
def restart(self) -> None: ...
|
||||
@@ -68,7 +68,7 @@ class DBAPIProxyCursor:
|
||||
def execute(self, stmt, parameters: Any | None = ..., **kw): ...
|
||||
def executemany(self, stmt, params, **kw): ...
|
||||
def __iter__(self): ...
|
||||
def __getattr__(self, key): ...
|
||||
def __getattr__(self, key: str): ...
|
||||
|
||||
class DBAPIProxyConnection:
|
||||
conn: Any
|
||||
@@ -77,6 +77,6 @@ class DBAPIProxyConnection:
|
||||
def __init__(self, engine, cursor_cls) -> None: ...
|
||||
def cursor(self, *args, **kwargs): ...
|
||||
def close(self) -> None: ...
|
||||
def __getattr__(self, key): ...
|
||||
def __getattr__(self, key: str): ...
|
||||
|
||||
def proxying_engine(conn_cls=..., cursor_cls=...): ...
|
||||
|
||||
@@ -29,7 +29,7 @@ def metadata_fixture(ddl: str = ...): ...
|
||||
def force_drop_names(*names): ...
|
||||
|
||||
class adict(dict[Any, Any]):
|
||||
def __getattribute__(self, key): ...
|
||||
def __getattribute__(self, key: str): ...
|
||||
def __call__(self, *keys): ...
|
||||
get_all: Any
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ class HasMemoized:
|
||||
def memoized_instancemethod(cls, fn): ...
|
||||
|
||||
class MemoizedSlots:
|
||||
def __getattr__(self, key): ...
|
||||
def __getattr__(self, key: str): ...
|
||||
|
||||
def asbool(obj): ...
|
||||
def bool_or_str(*text): ...
|
||||
|
||||
Reference in New Issue
Block a user