Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ repos:

- id: ty-check
name: ty-check
language: python
entry: uvx ty check
language: system
entry: uv run --locked ty check
pass_filenames: false
args: [--python=.venv/, --exclude=examples/]

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ dev = [
"ruff>=0.14.2",
"skylos>=3.2.3",
"together>=2.1.1",
"ty>=0.0.49",
"xai-sdk>=1.7.0",
]

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,7 @@ tree-sitter==0.25.2
# via skylos
tree-sitter-typescript==0.23.2
# via skylos
ty==0.0.49
typer==0.20.0
# via
# batchling
Expand Down
2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,4 @@ async def test_batchify_idempotent_hooks(reset_hooks):
async def test_batchify_rejects_target_keyword(reset_hooks, reset_context):
"""Test that legacy target keyword is rejected."""
with pytest.raises(expected_exception=TypeError, match="unexpected keyword argument 'target'"):
_ = batchify(target=object(), batch_size=10) # type: ignore[call-arg]
_ = batchify(target=object(), batch_size=10) # type: ignore[call-arg] # ty: ignore[unknown-argument]
12 changes: 6 additions & 6 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1360,8 +1360,8 @@ async def fake_parse_poll_response(
progress_percent=100.0,
)

provider.build_poll_request_spec = fake_build_poll_request_spec # type: ignore[method-assign]
provider.parse_poll_response = fake_parse_poll_response # type: ignore[method-assign]
provider.build_poll_request_spec = fake_build_poll_request_spec # type: ignore[method-assign] # ty: ignore[invalid-assignment]
provider.parse_poll_response = fake_parse_poll_response # type: ignore[method-assign] # ty: ignore[invalid-assignment]

def handler(request: httpx.Request) -> httpx.Response:
seen["request_url"] = str(object=request.url)
Expand Down Expand Up @@ -1411,7 +1411,7 @@ def fake_build_resume_context(
api_headers={"X-Custom": "1"},
)

provider.build_resume_context = fake_build_resume_context # type: ignore[method-assign]
provider.build_resume_context = fake_build_resume_context # type: ignore[method-assign] # ty: ignore[invalid-assignment]

await batcher._attach_cached_request(
provider=provider,
Expand Down Expand Up @@ -1492,7 +1492,7 @@ async def fake_fetch_results(
)
}

provider.fetch_results = fake_fetch_results # type: ignore[method-assign]
provider.fetch_results = fake_fetch_results # type: ignore[method-assign] # ty: ignore[invalid-assignment]

await batcher._resolve_batch_results(
base_url="https://api.openai.com",
Expand Down Expand Up @@ -1737,7 +1737,7 @@ async def fake_process_batch(*, queue_key: QueueKey, requests: list[_PendingRequ
captured["request_queue_key"] = requests[0].queue_key
called_event.set()

batcher._process_batch = fake_process_batch # type: ignore[method-assign]
batcher._process_batch = fake_process_batch # type: ignore[method-assign] # ty: ignore[invalid-assignment]
queue_key = _queue_key(provider_name=provider.name)
await batcher._submit_requests(queue_key=queue_key, requests=[request])
await asyncio.wait_for(called_event.wait(), timeout=1.0)
Expand Down Expand Up @@ -1785,7 +1785,7 @@ async def fake_process_batch(
captured["completion_window"] = completion_window
raise RuntimeError("provider call captured")

provider.process_batch = fake_process_batch # type: ignore[method-assign]
provider.process_batch = fake_process_batch # type: ignore[method-assign] # ty: ignore[invalid-assignment]
await batcher._process_batch(queue_key=queue_key, requests=[request])

assert captured["queue_key"] == queue_key
Expand Down
27 changes: 27 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading