Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
angus-langchain committed Dec 13, 2024
1 parent f997895 commit fbc217f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions python/langsmith/_internal/_background_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def _tracing_thread_drain_queue(


def _tracing_thread_drain_compressed_buffer(
client: Client, size_limit: int = 100, size_limit_bytes: int = 20_971_520
client: Client, size_limit: int = 100, size_limit_bytes: int | None = 20_971_520
) -> Optional[io.BytesIO]:
assert client.compressed_runs_buffer is not None
assert client.compressor_writer is not None
Expand All @@ -114,7 +114,7 @@ def _tracing_thread_drain_compressed_buffer(
)

if (size_limit_bytes is None or current_size < size_limit_bytes) and (
size_limit is None or len(client._run_count) < size_limit
size_limit is None or client._run_count < size_limit
):
return None

Expand Down Expand Up @@ -256,7 +256,6 @@ def tracing_control_thread_func_compress_parallel(
batch_ingest_config = _ensure_ingest_config(client.info)
size_limit: int = batch_ingest_config["size_limit"]
size_limit_bytes = batch_ingest_config.get("size_limit_bytes", 20_971_520)
assert size_limit_bytes is not None
num_known_refs = 3

def keep_thread_active() -> bool:
Expand Down

0 comments on commit fbc217f

Please sign in to comment.