File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -227,9 +227,9 @@ def session_id(self) -> str:
227
227
@abc .abstractmethod
228
228
def tx_id (self ) -> Optional [str ]:
229
229
"""
230
- Returns a id of open transaction or None otherwise
230
+ Returns an id of open transaction or None otherwise
231
231
232
- :return: A id of open transaction or None otherwise
232
+ :return: An id of open transaction or None otherwise
233
233
"""
234
234
pass
235
235
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ def _change_state(self, target: QueryTxStateEnum) -> None:
83
83
self ._check_invalid_transition (target )
84
84
self ._state = target
85
85
86
- def _check_tx_not_terminal (self ) -> None :
86
+ def _check_tx_ready_to_use (self ) -> None :
87
87
if QueryTxStateHelper .terminal (self ._state ):
88
88
raise RuntimeError (f"Transaction is in terminal state: { self ._state .value } " )
89
89
@@ -233,9 +233,9 @@ def session_id(self) -> str:
233
233
@property
234
234
def tx_id (self ) -> Optional [str ]:
235
235
"""
236
- Returns a id of open transaction or None otherwise
236
+ Returns an id of open transaction or None otherwise
237
237
238
- :return: A id of open transaction or None otherwise
238
+ :return: An id of open transaction or None otherwise
239
239
"""
240
240
return self ._tx_state .tx_id
241
241
@@ -371,7 +371,7 @@ def execute(
371
371
) -> base .SyncResponseContextIterator :
372
372
373
373
self ._ensure_prev_stream_finished ()
374
- self ._tx_state ._check_tx_not_terminal ()
374
+ self ._tx_state ._check_tx_ready_to_use ()
375
375
376
376
stream_it = self ._execute_call (
377
377
query = query ,
You can’t perform that action at this time.
0 commit comments