diff --git a/stdlib/unittest/mock.pyi b/stdlib/unittest/mock.pyi index 6c58f38a0..e4cedef1b 100644 --- a/stdlib/unittest/mock.pyi +++ b/stdlib/unittest/mock.pyi @@ -82,7 +82,7 @@ class _Call(tuple[Any, ...]): def __eq__(self, other: object) -> bool: ... def __ne__(self, __other: object) -> bool: ... def __call__(self, *args: Any, **kwargs: Any) -> _Call: ... - def __getattr__(self, attr: Any) -> Any: ... + def __getattr__(self, attr: str) -> Any: ... def __getattribute__(self, attr: str) -> Any: ... if sys.version_info >= (3, 8): @property diff --git a/stubs/Pillow/PIL/ImageStat.pyi b/stubs/Pillow/PIL/ImageStat.pyi index 13f08c5dc..33158daa3 100644 --- a/stubs/Pillow/PIL/ImageStat.pyi +++ b/stubs/Pillow/PIL/ImageStat.pyi @@ -4,6 +4,6 @@ class Stat: h: Any bands: Any def __init__(self, image_or_list, mask: Any | None = ...) -> None: ... - def __getattr__(self, id): ... + def __getattr__(self, id: str): ... Global = Stat diff --git a/stubs/Pillow/PIL/PdfParser.pyi b/stubs/Pillow/PIL/PdfParser.pyi index f5c8a184c..809091b16 100644 --- a/stubs/Pillow/PIL/PdfParser.pyi +++ b/stubs/Pillow/PIL/PdfParser.pyi @@ -48,8 +48,8 @@ class PdfArray(list[Any]): def __bytes__(self) -> bytes: ... class PdfDict(collections.UserDict[bytes, Any]): - def __setattr__(self, key, value) -> None: ... - def __getattr__(self, key): ... + def __setattr__(self, key: str, value) -> None: ... + def __getattr__(self, key: str): ... def __bytes__(self) -> bytes: ... class PdfBinary: diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/base.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/base.pyi index a7b58f6ea..7fc28ad92 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/base.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/base.pyi @@ -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): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/event/base.pyi b/stubs/SQLAlchemy/sqlalchemy/event/base.pyi index 4237aa096..683b9cc98 100644 --- a/stubs/SQLAlchemy/sqlalchemy/event/base.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/event/base.pyi @@ -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 diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/hybrid.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/hybrid.pyi index 5c3c186ce..0e399e0a2 100644 --- a/stubs/SQLAlchemy/sqlalchemy/ext/hybrid.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/ext/hybrid.pyi @@ -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 diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/attributes.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/attributes.pyi index 88e136e44..3cb0612d0 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/attributes.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/attributes.pyi @@ -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): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/clsregistry.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/clsregistry.pyi index 585189669..ada9490dd 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/clsregistry.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/clsregistry.pyi @@ -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 diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/util.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/util.pyi index 23a5624b6..9e18302eb 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/util.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/util.pyi @@ -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 diff --git a/stubs/SQLAlchemy/sqlalchemy/pool/base.pyi b/stubs/SQLAlchemy/sqlalchemy/pool/base.pyi index 9936b2d12..47a8df565 100644 --- a/stubs/SQLAlchemy/sqlalchemy/pool/base.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/pool/base.pyi @@ -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: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/pool/dbapi_proxy.pyi b/stubs/SQLAlchemy/sqlalchemy/pool/dbapi_proxy.pyi index 909b78d85..6bfa8ae86 100644 --- a/stubs/SQLAlchemy/sqlalchemy/pool/dbapi_proxy.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/pool/dbapi_proxy.pyi @@ -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: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/base.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/base.pyi index 248b73745..e1e2eb29c 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/base.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/base.pyi @@ -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: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/compiler.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/compiler.pyi index f1fb59ff4..0ecda8061 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/compiler.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/compiler.pyi @@ -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): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/elements.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/elements.pyi index 4ab36b9d7..6478ce6ac 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/elements.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/elements.pyi @@ -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 diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/functions.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/functions.pyi index 76058ff32..a77c22388 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/functions.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/functions.pyi @@ -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 diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/lambdas.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/lambdas.pyi index 4b77d78af..cc103a1ab 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/lambdas.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/lambdas.pyi @@ -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]: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/sql/type_api.pyi b/stubs/SQLAlchemy/sqlalchemy/sql/type_api.pyi index 93d73afe9..0778e5d14 100644 --- a/stubs/SQLAlchemy/sqlalchemy/sql/type_api.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/sql/type_api.pyi @@ -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: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/engines.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/engines.pyi index a0ce37134..c844caef7 100644 --- a/stubs/SQLAlchemy/sqlalchemy/testing/engines.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/testing/engines.pyi @@ -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=...): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/util.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/util.pyi index e716d838a..572acb7c7 100644 --- a/stubs/SQLAlchemy/sqlalchemy/testing/util.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/testing/util.pyi @@ -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 diff --git a/stubs/SQLAlchemy/sqlalchemy/util/langhelpers.pyi b/stubs/SQLAlchemy/sqlalchemy/util/langhelpers.pyi index 8a01199f9..ce3cc42e5 100644 --- a/stubs/SQLAlchemy/sqlalchemy/util/langhelpers.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/util/langhelpers.pyi @@ -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): ... diff --git a/stubs/aws-xray-sdk/aws_xray_sdk/core/async_context.pyi b/stubs/aws-xray-sdk/aws_xray_sdk/core/async_context.pyi index ebedf69fe..b2b3c873e 100644 --- a/stubs/aws-xray-sdk/aws_xray_sdk/core/async_context.pyi +++ b/stubs/aws-xray-sdk/aws_xray_sdk/core/async_context.pyi @@ -8,8 +8,8 @@ class AsyncContext(_Context): class TaskLocalStorage: def __init__(self, loop: Any | None = ...) -> None: ... - def __setattr__(self, name, value) -> None: ... - def __getattribute__(self, item): ... + def __setattr__(self, name: str, value) -> None: ... + def __getattribute__(self, item: str): ... def clear(self) -> None: ... def task_factory(loop, coro): ... diff --git a/stubs/babel/babel/support.pyi b/stubs/babel/babel/support.pyi index 4bc972147..07732526b 100644 --- a/stubs/babel/babel/support.pyi +++ b/stubs/babel/babel/support.pyi @@ -52,9 +52,9 @@ class LazyProxy: def __ne__(self, other): ... def __gt__(self, other): ... def __ge__(self, other): ... - def __delattr__(self, name) -> None: ... - def __getattr__(self, name): ... - def __setattr__(self, name, value) -> None: ... + def __delattr__(self, name: str) -> None: ... + def __getattr__(self, name: str): ... + def __setattr__(self, name: str, value) -> None: ... def __delitem__(self, key) -> None: ... def __getitem__(self, key): ... def __setitem__(self, key, value) -> None: ... diff --git a/stubs/boto/boto/exception.pyi b/stubs/boto/boto/exception.pyi index f49d0c46b..84e3a58bd 100644 --- a/stubs/boto/boto/exception.pyi +++ b/stubs/boto/boto/exception.pyi @@ -20,8 +20,8 @@ class BotoServerError(StandardError): message: str box_usage: Any def __init__(self, status, reason, body: Any | None = ..., *args) -> None: ... - def __getattr__(self, name): ... - def __setattr__(self, name, value) -> None: ... + def __getattr__(self, name: str): ... + def __setattr__(self, name: str, value) -> None: ... def startElement(self, name, attrs, connection): ... def endElement(self, name, value, connection): ... diff --git a/stubs/fpdf2/fpdf/deprecation.pyi b/stubs/fpdf2/fpdf/deprecation.pyi index 044aa1cf7..91885bd3d 100644 --- a/stubs/fpdf2/fpdf/deprecation.pyi +++ b/stubs/fpdf2/fpdf/deprecation.pyi @@ -1,5 +1,5 @@ from types import ModuleType class WarnOnDeprecatedModuleAttributes(ModuleType): - def __getattr__(self, name): ... - def __setattr__(self, name, value) -> None: ... + def __getattr__(self, name: str): ... + def __setattr__(self, name: str, value) -> None: ... diff --git a/stubs/fpdf2/fpdf/recorder.pyi b/stubs/fpdf2/fpdf/recorder.pyi index 6401da536..9d73e9fc0 100644 --- a/stubs/fpdf2/fpdf/recorder.pyi +++ b/stubs/fpdf2/fpdf/recorder.pyi @@ -4,7 +4,7 @@ class FPDFRecorder: pdf: Any accept_page_break: bool def __init__(self, pdf, accept_page_break: bool = ...) -> None: ... - def __getattr__(self, name): ... + def __getattr__(self, name: str): ... def rewind(self) -> None: ... def replay(self) -> None: ... diff --git a/stubs/google-cloud-ndb/google/cloud/ndb/model.pyi b/stubs/google-cloud-ndb/google/cloud/ndb/model.pyi index 2f7704131..8cd1415a2 100644 --- a/stubs/google-cloud-ndb/google/cloud/ndb/model.pyi +++ b/stubs/google-cloud-ndb/google/cloud/ndb/model.pyi @@ -226,7 +226,7 @@ class TimeProperty(DateTimeProperty): ... class StructuredProperty(Property): def __init__(self, model_class: type, name: str | None = ..., **kwargs) -> None: ... - def __getattr__(self, attrname): ... + def __getattr__(self, attrname: str): ... def IN(self, value: Iterable[object]) -> query_module.DisjunctionNode | query_module.FalseNode: ... class LocalStructuredProperty(BlobProperty): diff --git a/stubs/html5lib/html5lib/filters/base.pyi b/stubs/html5lib/html5lib/filters/base.pyi index 16d3726e0..166f20404 100644 --- a/stubs/html5lib/html5lib/filters/base.pyi +++ b/stubs/html5lib/html5lib/filters/base.pyi @@ -4,4 +4,4 @@ class Filter: source: Any def __init__(self, source) -> None: ... def __iter__(self): ... - def __getattr__(self, name): ... + def __getattr__(self, name: str): ... diff --git a/stubs/html5lib/html5lib/treewalkers/etree_lxml.pyi b/stubs/html5lib/html5lib/treewalkers/etree_lxml.pyi index 45a70f590..37bb1f33d 100644 --- a/stubs/html5lib/html5lib/treewalkers/etree_lxml.pyi +++ b/stubs/html5lib/html5lib/treewalkers/etree_lxml.pyi @@ -36,7 +36,7 @@ class FragmentWrapper: text: Any tail: Any def __init__(self, fragment_root, obj) -> None: ... - def __getattr__(self, name): ... + def __getattr__(self, name: str): ... def getnext(self): ... def __getitem__(self, key): ... def __bool__(self) -> bool: ... diff --git a/stubs/humanfriendly/humanfriendly/deprecation.pyi b/stubs/humanfriendly/humanfriendly/deprecation.pyi index f384fa8aa..db18163bd 100644 --- a/stubs/humanfriendly/humanfriendly/deprecation.pyi +++ b/stubs/humanfriendly/humanfriendly/deprecation.pyi @@ -10,5 +10,5 @@ class DeprecationProxy(types.ModuleType): module: Any aliases: Any def __init__(self, module, aliases) -> None: ... - def __getattr__(self, name): ... + def __getattr__(self, name: str): ... def resolve(self, target): ... diff --git a/stubs/invoke/invoke/config.pyi b/stubs/invoke/invoke/config.pyi index ca08a7225..6e843fdef 100644 --- a/stubs/invoke/invoke/config.pyi +++ b/stubs/invoke/invoke/config.pyi @@ -5,8 +5,8 @@ def load_source(name: str, path: str) -> dict[str, Any]: ... class DataProxy: @classmethod def from_data(cls, data, root=..., keypath=...): ... - def __getattr__(self, key): ... - def __setattr__(self, key, value) -> None: ... + def __getattr__(self, key: str): ... + def __setattr__(self, key: str, value) -> None: ... def __iter__(self): ... def __eq__(self, other): ... __hash__: ClassVar[None] # type: ignore[assignment] @@ -15,7 +15,7 @@ class DataProxy: def __getitem__(self, key): ... def __contains__(self, key): ... def __delitem__(self, key) -> None: ... - def __delattr__(self, name) -> None: ... + def __delattr__(self, name: str) -> None: ... def clear(self) -> None: ... def pop(self, *args): ... def popitem(self): ... diff --git a/stubs/ldap3/ldap3/abstract/attrDef.pyi b/stubs/ldap3/ldap3/abstract/attrDef.pyi index a15312a54..220abbb16 100644 --- a/stubs/ldap3/ldap3/abstract/attrDef.pyi +++ b/stubs/ldap3/ldap3/abstract/attrDef.pyi @@ -30,4 +30,4 @@ class AttrDef: def __eq__(self, other): ... def __lt__(self, other): ... def __hash__(self) -> int: ... - def __setattr__(self, key, value) -> None: ... + def __setattr__(self, key: str, value) -> None: ... diff --git a/stubs/ldap3/ldap3/abstract/entry.pyi b/stubs/ldap3/ldap3/abstract/entry.pyi index b7392e22c..f4ce9db51 100644 --- a/stubs/ldap3/ldap3/abstract/entry.pyi +++ b/stubs/ldap3/ldap3/abstract/entry.pyi @@ -20,8 +20,8 @@ class EntryBase: def __init__(self, dn, cursor) -> None: ... def __iter__(self): ... def __contains__(self, item): ... - def __getattr__(self, item): ... - def __setattr__(self, item, value) -> None: ... + def __getattr__(self, item: str): ... + def __setattr__(self, item: str, value) -> None: ... def __getitem__(self, item): ... def __eq__(self, other): ... def __lt__(self, other): ... @@ -69,8 +69,8 @@ class Entry(EntryBase): class WritableEntry(EntryBase): def __setitem__(self, key, value) -> None: ... - def __setattr__(self, item, value) -> None: ... - def __getattr__(self, item): ... + def __setattr__(self, item: str, value) -> None: ... + def __getattr__(self, item: str): ... @property def entry_virtual_attributes(self): ... def entry_commit_changes(self, refresh: bool = ..., controls: Any | None = ..., clear_history: bool = ...): ... diff --git a/stubs/ldap3/ldap3/abstract/objectDef.pyi b/stubs/ldap3/ldap3/abstract/objectDef.pyi index 5353fc846..6e2136a71 100644 --- a/stubs/ldap3/ldap3/abstract/objectDef.pyi +++ b/stubs/ldap3/ldap3/abstract/objectDef.pyi @@ -9,8 +9,8 @@ class ObjectDef: auxiliary_class: Any | None = ..., ) -> None: ... def __getitem__(self, item): ... - def __getattr__(self, item): ... - def __setattr__(self, key, value) -> None: ... + def __getattr__(self, item: str): ... + def __setattr__(self, key: str, value) -> None: ... def __iadd__(self, other): ... def __isub__(self, other): ... def __iter__(self): ... diff --git a/stubs/mysqlclient/MySQLdb/_mysql.pyi b/stubs/mysqlclient/MySQLdb/_mysql.pyi index 1fba3f13c..b1dded226 100644 --- a/stubs/mysqlclient/MySQLdb/_mysql.pyi +++ b/stubs/mysqlclient/MySQLdb/_mysql.pyi @@ -63,8 +63,8 @@ class connection: def thread_id(self, *args, **kwargs) -> Any: ... def use_result(self, *args, **kwargs) -> Any: ... def warning_count(self, *args, **kwargs) -> Any: ... - def __delattr__(self, __name) -> Any: ... - def __setattr__(self, __name, __value) -> Any: ... + def __delattr__(self, __name: str) -> None: ... + def __setattr__(self, __name: str, __value) -> None: ... class result: converter: Any @@ -76,8 +76,8 @@ class result: def field_flags(self, *args, **kwargs) -> Any: ... def num_fields(self, *args, **kwargs) -> Any: ... def num_rows(self, *args, **kwargs) -> Any: ... - def __delattr__(self, __name) -> Any: ... - def __setattr__(self, __name, __value) -> Any: ... + def __delattr__(self, __name: str) -> None: ... + def __setattr__(self, __name: str, __value) -> None: ... def connect(*args, **kwargs) -> Any: ... def debug(*args, **kwargs) -> Any: ... diff --git a/stubs/oauthlib/oauthlib/common.pyi b/stubs/oauthlib/oauthlib/common.pyi index 622e9e3ea..8b35c6a02 100644 --- a/stubs/oauthlib/oauthlib/common.pyi +++ b/stubs/oauthlib/oauthlib/common.pyi @@ -47,7 +47,7 @@ class Request: oauth_params: Any validator_log: Any def __init__(self, uri, http_method: str = ..., body: Any | None = ..., headers: Any | None = ..., encoding: str = ...): ... - def __getattr__(self, name): ... + def __getattr__(self, name: str): ... @property def uri_query(self): ... @property diff --git a/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/base.pyi b/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/base.pyi index 5ccdd7e76..1ac7b3bd3 100644 --- a/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/base.pyi +++ b/stubs/oauthlib/oauthlib/openid/connect/core/grant_types/base.pyi @@ -3,8 +3,8 @@ from typing import Any log: Any class GrantTypeBase: - def __getattr__(self, attr): ... - def __setattr__(self, attr, value) -> None: ... + def __getattr__(self, attr: str): ... + def __setattr__(self, attr: str, value) -> None: ... def validate_authorization_request(self, request): ... def id_token_hash(self, value, hashfunc=...): ... def add_id_token(self, token, token_handler, request, nonce: Any | None = ...): ... diff --git a/stubs/openpyxl/openpyxl/styles/named_styles.pyi b/stubs/openpyxl/openpyxl/styles/named_styles.pyi index b6d6f06d6..97770437b 100644 --- a/stubs/openpyxl/openpyxl/styles/named_styles.pyi +++ b/stubs/openpyxl/openpyxl/styles/named_styles.pyi @@ -27,7 +27,7 @@ class NamedStyle(Serialisable): # type: ignore[misc] hidden: bool = ..., xfId: Any | None = ..., ) -> None: ... - def __setattr__(self, attr, value) -> None: ... + def __setattr__(self, attr: str, value) -> None: ... def __iter__(self): ... @property def xfId(self): ... diff --git a/stubs/openpyxl/openpyxl/styles/proxy.pyi b/stubs/openpyxl/openpyxl/styles/proxy.pyi index b8e13b08a..6e9d3d305 100644 --- a/stubs/openpyxl/openpyxl/styles/proxy.pyi +++ b/stubs/openpyxl/openpyxl/styles/proxy.pyi @@ -1,7 +1,7 @@ class StyleProxy: def __init__(self, target) -> None: ... - def __getattr__(self, attr): ... - def __setattr__(self, attr, value) -> None: ... + def __getattr__(self, attr: str): ... + def __setattr__(self, attr: str, value) -> None: ... def __copy__(self): ... def __add__(self, other): ... def copy(self, **kw): ... diff --git a/stubs/passlib/passlib/registry.pyi b/stubs/passlib/passlib/registry.pyi index 18341cf92..c9790586c 100644 --- a/stubs/passlib/passlib/registry.pyi +++ b/stubs/passlib/passlib/registry.pyi @@ -3,8 +3,8 @@ from typing import Any class _PasslibRegistryProxy: __name__: str __package__: Any - def __getattr__(self, attr): ... - def __setattr__(self, attr, value) -> None: ... + def __getattr__(self, attr: str): ... + def __setattr__(self, attr: str, value) -> None: ... def __dir__(self): ... def register_crypt_handler_path(name, path) -> None: ... diff --git a/stubs/passlib/passlib/utils/binary.pyi b/stubs/passlib/passlib/utils/binary.pyi index a60666091..76aa4238d 100644 --- a/stubs/passlib/passlib/utils/binary.pyi +++ b/stubs/passlib/passlib/utils/binary.pyi @@ -43,7 +43,7 @@ class Base64Engine: class LazyBase64Engine(Base64Engine): def __init__(self, *args, **kwds) -> None: ... - def __getattribute__(self, attr): ... + def __getattribute__(self, attr: str): ... h64: Any h64big: Any diff --git a/stubs/passlib/passlib/utils/handlers.pyi b/stubs/passlib/passlib/utils/handlers.pyi index 7a58e78ef..4ee1f0259 100644 --- a/stubs/passlib/passlib/utils/handlers.pyi +++ b/stubs/passlib/passlib/utils/handlers.pyi @@ -159,8 +159,8 @@ class PrefixWrapper: @property def ident_values(self): ... def __dir__(self): ... - def __getattr__(self, attr): ... - def __setattr__(self, attr, value) -> None: ... + def __getattr__(self, attr: str): ... + def __setattr__(self, attr: str, value) -> None: ... def using(self, **kwds): ... def needs_update(self, hash, **kwds): ... def identify(self, hash): ... diff --git a/stubs/peewee/peewee.pyi b/stubs/peewee/peewee.pyi index da8e5f967..8433d59fb 100644 --- a/stubs/peewee/peewee.pyi +++ b/stubs/peewee/peewee.pyi @@ -42,8 +42,8 @@ class Proxy: def passthrough(method): ... __enter__: Incomplete __exit__: Incomplete - def __getattr__(self, attr): ... - def __setattr__(self, attr, value) -> None: ... + def __getattr__(self, attr: str): ... + def __setattr__(self, attr: str, value) -> None: ... class DatabaseProxy(Proxy): def connection_context(self): ... @@ -70,7 +70,7 @@ class AliasManager: class State: def __new__(cls, scope=..., parentheses: bool = ..., **kwargs): ... def __call__(self, scope: Incomplete | None = ..., parentheses: Incomplete | None = ..., **kwargs): ... - def __getattr__(self, attr_name): ... + def __getattr__(self, attr_name: str): ... class Context: stack: Incomplete @@ -113,7 +113,7 @@ class Node: class ColumnFactory: node: Incomplete def __init__(self, node) -> None: ... - def __getattr__(self, attr): ... + def __getattr__(self, attr: str): ... class _DynamicColumn: def __get__(self, instance, instance_type: Incomplete | None = ...): ... @@ -285,7 +285,7 @@ class WrappedNode(ColumnBase): class EntityFactory: node: Incomplete def __init__(self, node) -> None: ... - def __getattr__(self, attr): ... + def __getattr__(self, attr: str): ... class _DynamicEntity: def __get__(self, instance, instance_type: Incomplete | None = ...): ... @@ -361,7 +361,7 @@ class StringExpression(Expression): class Entity(ColumnBase): def __init__(self, *path) -> None: ... - def __getattr__(self, attr): ... + def __getattr__(self, attr: str): ... def get_sort_key(self, ctx): ... def __hash__(self) -> int: ... def __sql__(self, ctx): ... @@ -379,7 +379,7 @@ class Function(ColumnBase): name: Incomplete arguments: Incomplete def __init__(self, name, arguments, coerce: bool = ..., python_value: Incomplete | None = ...) -> None: ... - def __getattr__(self, attr): ... + def __getattr__(self, attr: str): ... def filter(self, where: Incomplete | None = ...) -> None: ... def order_by(self, *ordering) -> None: ... def python_value(self, func: Incomplete | None = ...) -> None: ... @@ -455,7 +455,7 @@ class NodeList(ColumnBase): class _Namespace(Node): def __init__(self, name) -> None: ... - def __getattr__(self, attr): ... + def __getattr__(self, attr: str): ... __getitem__: Incomplete class NamespaceAttribute(ColumnBase): @@ -1337,7 +1337,7 @@ class ForeignKeyField(Field): safe_name: Incomplete def bind(self, model, name, set_attribute: bool = ...) -> None: ... def foreign_key_constraint(self): ... - def __getattr__(self, attr): ... + def __getattr__(self, attr: str): ... class DeferredForeignKey(Field): field_kwargs: Incomplete @@ -1633,8 +1633,8 @@ class Model(metaclass=ModelBase): class ModelAlias(Node): def __init__(self, model, alias: Incomplete | None = ...) -> None: ... - def __getattr__(self, attr): ... - def __setattr__(self, attr, value) -> None: ... + def __getattr__(self, attr: str): ... + def __setattr__(self, attr: str, value) -> None: ... def get_field_aliases(self): ... def select(self, *selection): ... def __call__(self, **kwargs): ... @@ -1651,7 +1651,7 @@ class FieldAlias(Field): def adapt(self, value): ... def python_value(self, value): ... def db_value(self, value): ... - def __getattr__(self, attr): ... + def __getattr__(self, attr: str): ... def __sql__(self, ctx): ... class _ModelQueryHelper: diff --git a/stubs/pika/pika/adapters/base_connection.pyi b/stubs/pika/pika/adapters/base_connection.pyi index 342cf117d..ba21c0118 100644 --- a/stubs/pika/pika/adapters/base_connection.pyi +++ b/stubs/pika/pika/adapters/base_connection.pyi @@ -25,4 +25,4 @@ class _StreamingProtocolShim(nbio_interface.AbstractStreamProtocol): data_received: Incomplete conn: Incomplete def __init__(self, conn) -> None: ... - def __getattr__(self, attr): ... + def __getattr__(self, attr: str): ... diff --git a/stubs/prettytable/prettytable/prettytable.pyi b/stubs/prettytable/prettytable/prettytable.pyi index 3e7d2ae85..7b3d7307f 100644 --- a/stubs/prettytable/prettytable/prettytable.pyi +++ b/stubs/prettytable/prettytable/prettytable.pyi @@ -19,7 +19,7 @@ BASE_ALIGN_VALUE: str class PrettyTable: encoding: Any def __init__(self, field_names: Any | None = ..., **kwargs): ... - def __getattr__(self, name): ... + def __getattr__(self, name: str): ... def __getitem__(self, index): ... @property def field_names(self): ... diff --git a/stubs/pywin32/win32/lib/win32timezone.pyi b/stubs/pywin32/win32/lib/win32timezone.pyi index ae0abe3ed..763eee6be 100644 --- a/stubs/pywin32/win32/lib/win32timezone.pyi +++ b/stubs/pywin32/win32/lib/win32timezone.pyi @@ -15,7 +15,7 @@ class DYNAMIC_TIME_ZONE_INFORMATION(_SimpleStruct): ... class TimeZoneDefinition(DYNAMIC_TIME_ZONE_INFORMATION): def __init__(self, *args, **kwargs) -> None: ... - def __getattribute__(self, attr): ... + def __getattribute__(self, attr: str): ... @classmethod def current(cls): ... def set(self) -> None: ... diff --git a/stubs/pywin32/win32com/client/__init__.pyi b/stubs/pywin32/win32com/client/__init__.pyi index 797a3ed1f..31d4eca21 100644 --- a/stubs/pywin32/win32com/client/__init__.pyi +++ b/stubs/pywin32/win32com/client/__init__.pyi @@ -30,15 +30,15 @@ def CastTo(ob, target, typelib: Incomplete | None = ...): ... class Constants: __dicts__: Incomplete - def __getattr__(self, a): ... + def __getattr__(self, a: str): ... constants: Incomplete class EventsProxy: def __init__(self, ob) -> None: ... def __del__(self) -> None: ... - def __getattr__(self, attr): ... - def __setattr__(self, attr, val) -> None: ... + def __getattr__(self, attr: str): ... + def __setattr__(self, attr: str, val) -> None: ... def DispatchWithEvents(clsid, user_event_class): ... def WithEvents(disp, user_event_class): ... @@ -50,13 +50,13 @@ class DispatchBaseClass: def __dir__(self): ... def __eq__(self, other): ... def __ne__(self, other): ... - def __getattr__(self, attr): ... - def __setattr__(self, attr, value) -> None: ... + def __getattr__(self, attr: str): ... + def __setattr__(self, attr: str, value) -> None: ... class CoClassBaseClass: def __init__(self, oobj: Incomplete | None = ...) -> None: ... - def __getattr__(self, attr): ... - def __setattr__(self, attr, value) -> None: ... + def __getattr__(self, attr: str): ... + def __setattr__(self, attr: str, value) -> None: ... def __maybe__call__(self, *args, **kwargs): ... def __maybe__str__(self, *args): ... def __maybe__int__(self, *args): ... diff --git a/stubs/pywin32/win32comext/adsi/__init__.pyi b/stubs/pywin32/win32comext/adsi/__init__.pyi index 0b7df41d9..8a3afe5f5 100644 --- a/stubs/pywin32/win32comext/adsi/__init__.pyi +++ b/stubs/pywin32/win32comext/adsi/__init__.pyi @@ -63,7 +63,7 @@ class ADSIEnumerator: def __call__(self, index): ... class ADSIDispatch(win32com.client.CDispatch): - def __getattr__(self, attr): ... + def __getattr__(self, attr: str): ... def QueryInterface(self, iid): ... # Redefinition making "iid" optional. diff --git a/stubs/pywin32/win32comext/axdebug/adb.pyi b/stubs/pywin32/win32comext/axdebug/adb.pyi index 6f3ab4f68..70d39be22 100644 --- a/stubs/pywin32/win32comext/axdebug/adb.pyi +++ b/stubs/pywin32/win32comext/axdebug/adb.pyi @@ -17,7 +17,7 @@ class OutputReflector: writefunc: Incomplete file: Incomplete def __init__(self, file, writefunc) -> None: ... - def __getattr__(self, name): ... + def __getattr__(self, name: str): ... def write(self, message) -> None: ... g_adb: Incomplete diff --git a/stubs/pywin32/win32comext/axscript/server/error.pyi b/stubs/pywin32/win32comext/axscript/server/error.pyi index 2eb45eb40..deb38c3cf 100644 --- a/stubs/pywin32/win32comext/axscript/server/error.pyi +++ b/stubs/pywin32/win32comext/axscript/server/error.pyi @@ -3,4 +3,4 @@ from _typeshed import Incomplete class Exception: activeScriptError: Incomplete def __init__(self, activeScriptError) -> None: ... - def __getattr__(self, attr): ... + def __getattr__(self, attr: str): ... diff --git a/stubs/setuptools/setuptools/command/build_py.pyi b/stubs/setuptools/setuptools/command/build_py.pyi index 8e5e773a8..927206eb4 100644 --- a/stubs/setuptools/setuptools/command/build_py.pyi +++ b/stubs/setuptools/setuptools/command/build_py.pyi @@ -9,7 +9,7 @@ class build_py(orig.build_py): def finalize_options(self) -> None: ... def run(self) -> None: ... data_files: Any - def __getattr__(self, attr): ... + def __getattr__(self, attr: str): ... def build_module(self, module, module_file, package): ... def find_data_files(self, package, src_dir): ... def build_package_data(self) -> None: ... diff --git a/stubs/setuptools/setuptools/command/develop.pyi b/stubs/setuptools/setuptools/command/develop.pyi index 8b099dc80..f7c1058ce 100644 --- a/stubs/setuptools/setuptools/command/develop.pyi +++ b/stubs/setuptools/setuptools/command/develop.pyi @@ -27,5 +27,5 @@ class develop(namespaces.DevelopInstaller, easy_install): class VersionlessRequirement: def __init__(self, dist) -> None: ... - def __getattr__(self, name): ... + def __getattr__(self, name: str): ... def as_requirement(self): ... diff --git a/stubs/stripe/stripe/stripe_object.pyi b/stubs/stripe/stripe/stripe_object.pyi index 65acc34a6..b239c0260 100644 --- a/stubs/stripe/stripe/stripe_object.pyi +++ b/stubs/stripe/stripe/stripe_object.pyi @@ -20,9 +20,9 @@ class StripeObject(dict[Any, Any]): @property def last_response(self): ... def update(self, update_dict): ... - def __setattr__(self, k, v) -> None: ... - def __getattr__(self, k): ... - def __delattr__(self, k) -> None: ... + def __setattr__(self, k: str, v) -> None: ... + def __getattr__(self, k: str): ... + def __delattr__(self, k: str) -> None: ... def __setitem__(self, k, v) -> None: ... def __getitem__(self, k): ... def __delitem__(self, k) -> None: ... diff --git a/stubs/vobject/vobject/base.pyi b/stubs/vobject/vobject/base.pyi index 7b1c8c0a7..c88581cbc 100644 --- a/stubs/vobject/vobject/base.pyi +++ b/stubs/vobject/vobject/base.pyi @@ -61,9 +61,9 @@ class ContentLine(VBase): def duplicate(cls, copyit): ... def copy(self, copyit) -> None: ... def __eq__(self, other): ... - def __getattr__(self, name): ... - def __setattr__(self, name, value) -> None: ... - def __delattr__(self, name) -> None: ... + def __getattr__(self, name: str): ... + def __setattr__(self, name: str, value) -> None: ... + def __delattr__(self, name: str) -> None: ... def valueRepr(self): ... def __unicode__(self): ... def prettyPrint(self, level: int = ..., tabwidth: int = ...) -> None: ... @@ -77,10 +77,10 @@ class Component(VBase): def duplicate(cls, copyit): ... def copy(self, copyit) -> None: ... def setProfile(self, name) -> None: ... - def __getattr__(self, name): ... + def __getattr__(self, name: str): ... normal_attributes: Any - def __setattr__(self, name, value) -> None: ... - def __delattr__(self, name) -> None: ... + def __setattr__(self, name: str, value) -> None: ... + def __delattr__(self, name: str) -> None: ... def getChildValue(self, childName, default: Any | None = ..., childNumber: int = ...): ... @overload def add(self, objOrName: _V, group: str | None = ...) -> _V: ...