Skip to content

Commit a5870d9

Browse files
committed
style fixes
1 parent f8e3edd commit a5870d9

File tree

2 files changed

+1
-33
lines changed

2 files changed

+1
-33
lines changed

ydb/aio/query/session.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(
3030
self,
3131
driver: base.SupportedDriverType,
3232
settings: Optional[base.QueryClientSettings] = None,
33-
loop: asyncio.AbstractEventLoop = None
33+
loop: asyncio.AbstractEventLoop = None,
3434
):
3535
super(QuerySessionAsync, self).__init__(driver, settings)
3636
self._loop = loop if loop is not None else asyncio.get_running_loop()
@@ -99,7 +99,6 @@ def transaction(self, tx_mode=None) -> base.IQueryTxContext:
9999
self._state,
100100
self,
101101
tx_mode,
102-
self._loop,
103102
)
104103

105104
async def execute(

ydb/aio/query/transaction.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import asyncio
21
import logging
32
from typing import (
43
Optional,
@@ -16,36 +15,6 @@
1615

1716

1817
class QueryTxContextAsync(BaseQueryTxContext):
19-
_loop: asyncio.AbstractEventLoop
20-
21-
def __init__(self, driver, session_state, session, tx_mode, loop):
22-
"""
23-
An object that provides a simple transaction context manager that allows statements execution
24-
in a transaction. You don't have to open transaction explicitly, because context manager encapsulates
25-
transaction control logic, and opens new transaction if:
26-
27-
1) By explicit .begin() method;
28-
2) On execution of a first statement, which is strictly recommended method, because that avoids useless round trip
29-
30-
This context manager is not thread-safe, so you should not manipulate on it concurrently.
31-
32-
:param driver: A driver instance
33-
:param session_state: A state of session
34-
:param tx_mode: Transaction mode, which is a one from the following choises:
35-
1) QuerySerializableReadWrite() which is default mode;
36-
2) QueryOnlineReadOnly(allow_inconsistent_reads=False);
37-
3) QuerySnapshotReadOnly();
38-
4) QueryStaleReadOnly().
39-
"""
40-
41-
super(QueryTxContextAsync, self).__init__(
42-
driver,
43-
session_state,
44-
session,
45-
tx_mode,
46-
)
47-
self._loop = loop
48-
4918
async def __aenter__(self) -> "QueryTxContextAsync":
5019
"""
5120
Enters a context manager and returns a transaction

0 commit comments

Comments
 (0)