Skip to content

Commit 64897c6

Browse files
committed
Rename _UOW attribute in SQLAlchemyAsyncRepository
1 parent 3a10792 commit 64897c6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sqlalchemy_bind_manager/_repository/async_.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414
class SQLAlchemyAsyncRepository(Generic[MODEL], BaseRepository[MODEL], ABC):
15-
_UOW: AsyncSessionHandler
15+
_session_handler: AsyncSessionHandler
1616
_external_session: Union[AsyncSession, None]
1717

1818
def __init__(
@@ -31,12 +31,12 @@ def __init__(
3131
raise InvalidConfig("Either `bind` or `session` have to be used, not both")
3232
self._external_session = session
3333
if bind:
34-
self._UOW = AsyncSessionHandler(bind)
34+
self._session_handler = AsyncSessionHandler(bind)
3535

3636
@asynccontextmanager
3737
async def _get_session(self, commit: bool = True) -> AsyncIterator[AsyncSession]:
3838
if not self._external_session:
39-
async with self._UOW.get_session(not commit) as _session:
39+
async with self._session_handler.get_session(not commit) as _session:
4040
yield _session
4141
else:
4242
yield self._external_session

0 commit comments

Comments
 (0)