Skip to content

Commit 66bfe09

Browse files
committed
more style fixes
1 parent 779950f commit 66bfe09

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

ydb/_grpc/grpcwrapper/ydb_query.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,14 @@ class TransactionControl(IToProto):
147147

148148
def to_proto(self) -> ydb_query_pb2.TransactionControl:
149149
if self.tx_id:
150-
return ydb_query_pb2.TransactionControl(tx_id=self.tx_id,commit_tx=self.commit_tx)
151-
return ydb_query_pb2.TransactionControl(begin_tx=self.begin_tx.to_proto(), commit_tx=self.commit_tx)
150+
return ydb_query_pb2.TransactionControl(
151+
tx_id=self.tx_id,
152+
commit_tx=self.commit_tx,
153+
)
154+
return ydb_query_pb2.TransactionControl(
155+
begin_tx=self.begin_tx.to_proto(),
156+
commit_tx=self.commit_tx,
157+
)
152158

153159

154160
@dataclass

ydb/query/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def __init__(
8383
driver: SupportedDriverType,
8484
session_state: IQuerySessionState,
8585
session: IQuerySession,
86-
tx_mode: BaseQueryTxMode = None
86+
tx_mode: BaseQueryTxMode = None,
8787
):
8888
pass
8989

@@ -132,7 +132,7 @@ def session(self) -> IQuerySession:
132132

133133

134134
def create_execute_query_request(
135-
query: str, session_id: str, tx_id: str = None, commit_tx: bool = False, tx_mode: BaseQueryTxMode = None
135+
query: str, session_id: str, tx_id: str = None, commit_tx: bool = False, tx_mode: BaseQueryTxMode = None
136136
):
137137
if tx_id:
138138
req = ydb_query.ExecuteQueryRequest(

ydb/query/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class QuerySessionStateHelper(abc.ABC):
2828
_VALID_TRANSITIONS = {
2929
QuerySessionStateEnum.NOT_INITIALIZED: [QuerySessionStateEnum.CREATED],
3030
QuerySessionStateEnum.CREATED: [QuerySessionStateEnum.CLOSED],
31-
QuerySessionStateEnum.CLOSED: []
31+
QuerySessionStateEnum.CLOSED: [],
3232
}
3333

3434
_READY_TO_USE = [

0 commit comments

Comments
 (0)