From 3e828bd307ad13cfa36573f861ad88373bef7963 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Sun, 16 Oct 2022 14:47:47 +0300 Subject: [PATCH] Remove empty `__init__` methods from classes with 0 parents (#8907) --- stubs/PyMySQL/pymysql/charset.pyi | 1 - stubs/SQLAlchemy/sqlalchemy/dialects/mysql/reflection.pyi | 1 - stubs/SQLAlchemy/sqlalchemy/ext/compiler.pyi | 1 - stubs/SQLAlchemy/sqlalchemy/orm/identity.pyi | 1 - stubs/SQLAlchemy/sqlalchemy/orm/loading.pyi | 1 - stubs/SQLAlchemy/sqlalchemy/orm/state.pyi | 1 - stubs/SQLAlchemy/sqlalchemy/orm/strategy_options.pyi | 1 - stubs/SQLAlchemy/sqlalchemy/testing/assertsql.pyi | 1 - stubs/SQLAlchemy/sqlalchemy/testing/engines.pyi | 1 - stubs/SQLAlchemy/sqlalchemy/testing/exclusions.pyi | 1 - stubs/SQLAlchemy/sqlalchemy/testing/provision.pyi | 1 - stubs/python-gflags/gflags.pyi | 1 - stubs/setuptools/setuptools/sandbox.pyi | 1 - stubs/tqdm/tqdm/contrib/utils_worker.pyi | 1 - stubs/urllib3/urllib3/response.pyi | 3 --- stubs/vobject/vobject/base.pyi | 1 - stubs/vobject/vobject/behavior.pyi | 1 - stubs/waitress/waitress/task.pyi | 1 - stubs/waitress/waitress/trigger.pyi | 1 - 19 files changed, 21 deletions(-) diff --git a/stubs/PyMySQL/pymysql/charset.pyi b/stubs/PyMySQL/pymysql/charset.pyi index c47679a78..0a36fa695 100644 --- a/stubs/PyMySQL/pymysql/charset.pyi +++ b/stubs/PyMySQL/pymysql/charset.pyi @@ -7,7 +7,6 @@ class Charset: def __init__(self, id, name, collation, is_default): ... class Charsets: - def __init__(self): ... def add(self, c): ... def by_id(self, id): ... def by_name(self, name): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/reflection.pyi b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/reflection.pyi index 0df92ff88..f27c18525 100644 --- a/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/reflection.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/dialects/mysql/reflection.pyi @@ -7,7 +7,6 @@ class ReflectedState: keys: Any fk_constraints: Any ck_constraints: Any - def __init__(self) -> None: ... class MySQLTableDefinitionParser: logger: Any diff --git a/stubs/SQLAlchemy/sqlalchemy/ext/compiler.pyi b/stubs/SQLAlchemy/sqlalchemy/ext/compiler.pyi index cc2363f1a..79b29eea9 100644 --- a/stubs/SQLAlchemy/sqlalchemy/ext/compiler.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/ext/compiler.pyi @@ -5,5 +5,4 @@ def deregister(class_) -> None: ... class _dispatcher: specs: Any - def __init__(self) -> None: ... def __call__(self, element, compiler, **kw): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/identity.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/identity.pyi index deb590c27..85329f11d 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/identity.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/identity.pyi @@ -1,7 +1,6 @@ from typing import Any class IdentityMap: - def __init__(self) -> None: ... def keys(self): ... def replace(self, state) -> None: ... def add(self, state) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/loading.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/loading.pyi index ce8486f59..776f8c56a 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/loading.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/loading.pyi @@ -34,7 +34,6 @@ class PostLoad: loaders: Any states: Any load_keys: Any - def __init__(self) -> None: ... def add_state(self, state, overwrite) -> None: ... def invoke(self, context, path) -> None: ... @classmethod diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/state.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/state.pyi index 134ff2259..60621f0bf 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/state.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/state.pyi @@ -78,6 +78,5 @@ class AttributeState: class PendingCollection: deleted_items: Any added_items: Any - def __init__(self) -> None: ... def append(self, value) -> None: ... def remove(self, value) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/orm/strategy_options.pyi b/stubs/SQLAlchemy/sqlalchemy/orm/strategy_options.pyi index 5fa175bbe..c687fd182 100644 --- a/stubs/SQLAlchemy/sqlalchemy/orm/strategy_options.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/orm/strategy_options.pyi @@ -44,7 +44,6 @@ class _UnboundLoad(Load): def __init__(self) -> None: ... class loader_option: - def __init__(self) -> None: ... name: Any fn: Any def __call__(self, fn): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/assertsql.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/assertsql.pyi index 6e30c7727..77421907e 100644 --- a/stubs/SQLAlchemy/sqlalchemy/testing/assertsql.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/testing/assertsql.pyi @@ -76,7 +76,6 @@ class SQLCursorExecuteObserved: ... class SQLAsserter: accumulated: Any - def __init__(self) -> None: ... def assert_(self, *rules) -> None: ... def assert_engine(engine) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/engines.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/engines.pyi index 1ca2dff85..a0ce37134 100644 --- a/stubs/SQLAlchemy/sqlalchemy/testing/engines.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/testing/engines.pyi @@ -10,7 +10,6 @@ class ConnectionKiller: proxy_refs: Any testing_engines: Any dbapi_connections: Any - def __init__(self) -> None: ... def add_pool(self, pool) -> None: ... def add_engine(self, engine, scope) -> None: ... def rollback_all(self) -> None: ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/exclusions.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/exclusions.pyi index 4cc9913e6..869dcb57f 100644 --- a/stubs/SQLAlchemy/sqlalchemy/testing/exclusions.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/testing/exclusions.pyi @@ -7,7 +7,6 @@ class compound: fails: Any skips: Any tags: Any - def __init__(self) -> None: ... def __add__(self, other): ... def as_skips(self): ... def add(self, *others): ... diff --git a/stubs/SQLAlchemy/sqlalchemy/testing/provision.pyi b/stubs/SQLAlchemy/sqlalchemy/testing/provision.pyi index ec8c6487d..a6c48328b 100644 --- a/stubs/SQLAlchemy/sqlalchemy/testing/provision.pyi +++ b/stubs/SQLAlchemy/sqlalchemy/testing/provision.pyi @@ -5,7 +5,6 @@ FOLLOWER_IDENT: Any class register: fns: Any - def __init__(self) -> None: ... @classmethod def init(cls, fn): ... def for_db(self, *dbnames): ... diff --git a/stubs/python-gflags/gflags.pyi b/stubs/python-gflags/gflags.pyi index 4205483c4..84da38655 100644 --- a/stubs/python-gflags/gflags.pyi +++ b/stubs/python-gflags/gflags.pyi @@ -35,7 +35,6 @@ def doc_to_help(doc: str) -> str: ... DocToHelp = doc_to_help class FlagValues: - def __init__(self) -> None: ... def UseGnuGetOpt(self, use_gnu_getopt: bool = ...) -> None: ... def is_gnu_getopt(self) -> bool: ... IsGnuGetOpt = is_gnu_getopt diff --git a/stubs/setuptools/setuptools/sandbox.pyi b/stubs/setuptools/setuptools/sandbox.pyi index 293d11288..994ff292f 100644 --- a/stubs/setuptools/setuptools/sandbox.pyi +++ b/stubs/setuptools/setuptools/sandbox.pyi @@ -13,7 +13,6 @@ class ExceptionSaver: def run_setup(setup_script, args): ... class AbstractSandbox: - def __init__(self) -> None: ... def __enter__(self) -> None: ... def __exit__(self, exc_type, exc_value, traceback) -> None: ... def run(self, func): ... diff --git a/stubs/tqdm/tqdm/contrib/utils_worker.pyi b/stubs/tqdm/tqdm/contrib/utils_worker.pyi index bd84e5154..bff826211 100644 --- a/stubs/tqdm/tqdm/contrib/utils_worker.pyi +++ b/stubs/tqdm/tqdm/contrib/utils_worker.pyi @@ -13,5 +13,4 @@ _R = TypeVar("_R") class MonoWorker: pool: ThreadPoolExecutor futures: deque[Future[Incomplete]] - def __init__(self) -> None: ... def submit(self, func: Callable[_P, _R], *args: _P.args, **kwargs: _P.kwargs) -> Future[_R]: ... diff --git a/stubs/urllib3/urllib3/response.pyi b/stubs/urllib3/urllib3/response.pyi index c68cd3ebf..ac72ced0a 100644 --- a/stubs/urllib3/urllib3/response.pyi +++ b/stubs/urllib3/urllib3/response.pyi @@ -13,7 +13,6 @@ from ._collections import HTTPHeaderDict _TYPE_BODY: TypeAlias = bytes | IO[Any] | Iterable[bytes] | str class DeflateDecoder: - def __init__(self) -> None: ... def __getattr__(self, name: str) -> Any: ... def decompress(self, data: bytes) -> bytes: ... @@ -23,14 +22,12 @@ class GzipDecoderState: SWALLOW_DATA: Literal[2] class GzipDecoder: - def __init__(self) -> None: ... def __getattr__(self, name: str) -> Any: ... def decompress(self, data: bytes) -> bytes: ... # This class is only available if # `brotli` is available for import. class BrotliDecoder: - def __init__(self) -> None: ... def flush(self) -> bytes: ... class MultiDecoder: diff --git a/stubs/vobject/vobject/base.pyi b/stubs/vobject/vobject/base.pyi index 165a608da..69be407a7 100644 --- a/stubs/vobject/vobject/base.pyi +++ b/stubs/vobject/vobject/base.pyi @@ -133,7 +133,6 @@ def defaultSerialize(obj, buf, lineLength): ... class Stack: stack: Any - def __init__(self) -> None: ... def __len__(self): ... def top(self): ... def topName(self): ... diff --git a/stubs/vobject/vobject/behavior.pyi b/stubs/vobject/vobject/behavior.pyi index c165c7239..9c6e5a6ec 100644 --- a/stubs/vobject/vobject/behavior.pyi +++ b/stubs/vobject/vobject/behavior.pyi @@ -12,7 +12,6 @@ class Behavior: allowGroup: bool forceUTC: bool sortFirst: Any - def __init__(self) -> None: ... @classmethod def validate(cls, obj, raiseException: bool = ..., complainUnrecognized: bool = ...): ... @classmethod diff --git a/stubs/waitress/waitress/task.pyi b/stubs/waitress/waitress/task.pyi index cb8e67591..7a88a9cd2 100644 --- a/stubs/waitress/waitress/task.pyi +++ b/stubs/waitress/waitress/task.pyi @@ -20,7 +20,6 @@ class ThreadedTaskDispatcher: lock: Lock = ... queue_cv: Condition = ... thread_exit_cv: Condition = ... - def __init__(self) -> None: ... def start_new_thread(self, target: Any, args: Any) -> None: ... def handler_thread(self, thread_no: int) -> None: ... def set_thread_count(self, count: int) -> None: ... diff --git a/stubs/waitress/waitress/trigger.pyi b/stubs/waitress/waitress/trigger.pyi index 0908963ba..8736ece99 100644 --- a/stubs/waitress/waitress/trigger.pyi +++ b/stubs/waitress/waitress/trigger.pyi @@ -10,7 +10,6 @@ class _triggerbase: kind: str | None = ... lock: Lock = ... thunks: Callable[[None], None] = ... - def __init__(self) -> None: ... def readable(self) -> Literal[True]: ... def writable(self) -> Literal[False]: ... def handle_connect(self) -> None: ...