From ec5640645c1937ff33660ba79ca5c7121633749e Mon Sep 17 00:00:00 2001 From: Innokentii Mokin Date: Thu, 25 Jan 2024 10:18:33 +0000 Subject: [PATCH] fix formatting --- ydb/__init__.py | 2 +- ydb/draft/dynamic_config.py | 16 +++------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/ydb/__init__.py b/ydb/__init__.py index 8669a9aa..4fae68b0 100644 --- a/ydb/__init__.py +++ b/ydb/__init__.py @@ -18,7 +18,7 @@ from .import_client import * # noqa from .tracing import * # noqa from .topic import * # noqa -import ydb.draft # noqa +import ydb.draft # noqa try: import ydb.aio as aio # noqa diff --git a/ydb/draft/dynamic_config.py b/ydb/draft/dynamic_config.py index f18a744f..271fdb5a 100644 --- a/ydb/draft/dynamic_config.py +++ b/ydb/draft/dynamic_config.py @@ -36,7 +36,7 @@ def __init__(self, version, cluster, config, *args, **kwargs): class NodeLabels(object): - __slots__ = ("labels") + __slots__ = "labels" def __init__(self, labels, *args, **kwargs): self.labels = labels @@ -71,13 +71,7 @@ def _get_node_labels_request_factory(node_id): def _wrap_dynamic_config(config_pb, dynamic_config_cls=None, *args, **kwargs): dynamic_config_cls = DynamicConfig if dynamic_config_cls is None else dynamic_config_cls - return dynamic_config_cls( - config_pb.identity.version, - config_pb.identity.cluster, - config_pb.config, - *args, - **kwargs - ) + return dynamic_config_cls(config_pb.identity.version, config_pb.identity.cluster, config_pb.config, *args, **kwargs) def _wrap_get_config_response(rpc_state, response): @@ -89,11 +83,7 @@ def _wrap_get_config_response(rpc_state, response): def _wrap_node_labels(labels_pb, node_labels_cls=None, *args, **kwargs): node_labels_cls = NodeLabels if node_labels_cls is None else node_labels_cls - return node_labels_cls( - dict([(entry.label, entry.value) for entry in labels_pb.labels]), - *args, - **kwargs - ) + return node_labels_cls(dict([(entry.label, entry.value) for entry in labels_pb.labels]), *args, **kwargs) def _wrap_get_node_labels_response(rpc_state, response):