Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Enjection committed Jan 25, 2024
1 parent 5ba14ea commit ec56406
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion ydb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 3 additions & 13 deletions ydb/draft/dynamic_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand All @@ -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):
Expand Down

0 comments on commit ec56406

Please sign in to comment.