Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions packages/keploy-framework/src/keploy_framework/recorder.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
"""Recording session utilities."""

import httpx
from collections.abc import AsyncIterator
from contextlib import asynccontextmanager
from typing import AsyncIterator
from types import TracebackType

import httpx


class RecordingSession:
Expand All @@ -26,7 +28,12 @@ async def __aenter__(self) -> "RecordingSession":
self.client = httpx.AsyncClient(base_url=self.api_url)
return self

async def __aexit__(self, exc_type, exc_val, exc_tb) -> None: # type: ignore[no-untyped-def]
async def __aexit__(
self,
exc_type: type[BaseException] | None,
exc_val: BaseException | None,
exc_tb: TracebackType | None,
) -> None:
"""Exit recording context."""
if self.client:
await self.client.aclose()
Expand Down
Loading