Skip to content

Commit 927a80b

Browse files
committed
type hint fix
1 parent 6a92731 commit 927a80b

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

context_async_sqlalchemy/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@asynccontextmanager
1818
async def rollback_session(
1919
connection: DBConnect,
20-
) -> AsyncGenerator[AsyncSession]:
20+
) -> AsyncGenerator[AsyncSession, None]:
2121
"""A session that always rolls back"""
2222
session_maker = await connection.session_maker()
2323
async with session_maker() as session:

docs/api/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ <h3 id="rollback_session">rollback_session</h3>
379379
<pre><code class="language-python">@asynccontextmanager
380380
async def rollback_session(
381381
connection: DBConnect,
382-
) -&gt; AsyncGenerator[AsyncSession]:
382+
) -&gt; AsyncGenerator[AsyncSession, None]:
383383
</code></pre>
384384
<p>A context manager that creates a session which is automatically rolled
385385
back at the end.

docs/search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/testing/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ <h2 id="create-session-with-autorollback">Create session with autorollback</h2>
153153
<pre><code class="language-python">from context_async_sqlalchemy.test_utils import rollback_session
154154

155155
@pytest_asyncio.fixture
156-
async def db_session_test() -&gt; AsyncGenerator[AsyncSession]:
156+
async def db_session_test() -&gt; AsyncGenerator[AsyncSession, None]:
157157
&quot;&quot;&quot;The session that is used inside the test&quot;&quot;&quot;
158158
async with rollback_session(connection) as session:
159159
yield session

docs_sources/docs/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ You can read more about testing here: [Testing](testing.md)
306306
@asynccontextmanager
307307
async def rollback_session(
308308
connection: DBConnect,
309-
) -> AsyncGenerator[AsyncSession]:
309+
) -> AsyncGenerator[AsyncSession, None]:
310310
```
311311
A context manager that creates a session which is automatically rolled
312312
back at the end.

docs_sources/docs/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ application and the tests.](https://github.com/krylosov-aa/context-async-sqlalch
6868
from context_async_sqlalchemy.test_utils import rollback_session
6969

7070
@pytest_asyncio.fixture
71-
async def db_session_test() -> AsyncGenerator[AsyncSession]:
71+
async def db_session_test() -> AsyncGenerator[AsyncSession, None]:
7272
"""The session that is used inside the test"""
7373
async with rollback_session(connection) as session:
7474
yield session

examples/fastapi_example/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ async def client(app: FastAPI) -> AsyncGenerator[AsyncClient]:
3737

3838

3939
@pytest_asyncio.fixture
40-
async def db_session_test() -> AsyncGenerator[AsyncSession]:
40+
async def db_session_test() -> AsyncGenerator[AsyncSession, None]:
4141
"""The session that is used inside the test"""
4242
async with rollback_session(connection) as session:
4343
yield session

examples/fastapi_with_pure_asgi_example/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ async def client(app: FastAPI) -> AsyncGenerator[AsyncClient]:
3737

3838

3939
@pytest_asyncio.fixture
40-
async def db_session_test() -> AsyncGenerator[AsyncSession]:
40+
async def db_session_test() -> AsyncGenerator[AsyncSession, None]:
4141
"""The session that is used inside the test"""
4242
async with rollback_session(connection) as session:
4343
yield session

examples/starlette_example/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ async def client(app: Starlette) -> AsyncGenerator[AsyncClient]:
3737

3838

3939
@pytest_asyncio.fixture
40-
async def db_session_test() -> AsyncGenerator[AsyncSession]:
40+
async def db_session_test() -> AsyncGenerator[AsyncSession, None]:
4141
"""The session that is used inside the test"""
4242
async with rollback_session(connection) as session:
4343
yield session

0 commit comments

Comments
 (0)