Skip to content

Commit 7bc98ed

Browse files
committed
Compare base_url host in test to satisfy CodeQL
1 parent 3dd8429 commit 7bc98ed

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ Releases are published automatically on every merge to `main`. Release notes for
1111
- `client.rpc(Definition)`: typed plugin RPC calls and event subscriptions declared with `RpcDefinition`,
1212
`rpc_method` and `rpc_event`; RPC failures raise `RpcCallError` / `RpcCallInternalError`.
1313
- `Stream.on_activity` and `Stream.interrupt()`.
14-
- `OPENCODE_LOG=debug|info` sends the `opencode` logger to stderr at that level.
1514
- `client.copy(...)`, an alias of `client.with_options(...)`; documented that copies share the connection pool
1615
and do not close it.
16+
- `OPENCODE_LOG=debug|info` sends the `opencode` logger to stderr at that level.
1717
- `DefaultAioHttpClient`: an optional aiohttp transport for `AsyncOpencode`, installed with the `aiohttp` extra
1818
(`pip install 'opencode-python-sdk[aiohttp]'`) and passed as `http_client=`.
1919
- `.with_raw_response` and `.with_streaming_response` on every resource (sync and async): return an

‎docs/reference/clients.md‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,17 @@
22

33
::: opencode.Opencode
44
options:
5-
members: [with_options, copy, close, wait_until_ready, fake]
6-
members: [with_options, close, wait_until_ready, fake, get, post, put, patch, delete]
5+
members: [with_options, copy, close, wait_until_ready, fake, get, post, put, patch, delete]
76
show_bases: false
87

98
::: opencode.AsyncOpencode
109
options:
11-
members: [with_options, copy, close, wait_until_ready, fake]
10+
members: [with_options, copy, close, wait_until_ready, fake, get, post, put, patch, delete]
1211
show_bases: false
1312

1413
::: opencode.DefaultAioHttpClient
1514
options:
1615
members: false
17-
members: [with_options, close, wait_until_ready, fake, get, post, put, patch, delete]
1816
show_bases: false
1917

2018
## Module constants

‎tests/test_with_options.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_overrides_apply_and_original_unchanged(mock_api: respx.MockRouter, meth
4040
def test_base_url_override(mock_api: respx.MockRouter) -> None:
4141
with Opencode(BASE_URL, password="") as client:
4242
other = client.with_options(base_url="http://other.test")
43-
assert str(other.base_url).startswith("http://other.test")
43+
assert other.base_url.host == "other.test"
4444
assert str(client.base_url).startswith(BASE_URL)
4545

4646

0 commit comments

Comments
 (0)