Skip to content

Commit 7d79ef0

Browse files
committed
fix: resolve lint and mypy errors after rebase on main
1 parent c30f66d commit 7d79ef0

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/any_llm/providers/platform/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
TRACE_API_PATH = "/v1/traces"
2525

2626
_trace_base_url = ANY_LLM_PLATFORM_API_URL
27-
if _trace_base_url.endswith("/api/v1"):
28-
_trace_base_url = _trace_base_url[: -len("/api/v1")]
27+
_trace_base_url = _trace_base_url.removesuffix("/api/v1")
2928
ANY_LLM_PLATFORM_TRACE_URL = f"{_trace_base_url}{TRACE_API_PATH}"
3029

3130
# Module-level cache: access_token -> TracerProvider

tests/unit/providers/test_platform_provider.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def mock_streaming_chunks() -> list[ChatCompletionChunk]:
144144
]
145145

146146

147-
def _get_single_span(exporter: InMemorySpanExporter): # type: ignore[type-arg]
147+
def _get_single_span(exporter: InMemorySpanExporter) -> Any:
148148
spans = exporter.get_finished_spans()
149149
assert len(spans) == 1
150150
return spans[0]
@@ -1277,7 +1277,7 @@ async def test_trace_export_uses_bearer_token(
12771277
mock_http_client = AsyncMock(spec=httpx.AsyncClient)
12781278
captured: dict[str, Any] = {}
12791279

1280-
def _exporter_factory(*args: Any, **kwargs: Any) -> InMemorySpanExporter: # type: ignore[type-arg]
1280+
def _exporter_factory(*args: Any, **kwargs: Any) -> InMemorySpanExporter:
12811281
captured.update(kwargs)
12821282
return InMemorySpanExporter()
12831283

@@ -1328,7 +1328,7 @@ async def test_trace_export_includes_version_header(
13281328
mock_http_client = AsyncMock(spec=httpx.AsyncClient)
13291329
captured: dict[str, Any] = {}
13301330

1331-
def _exporter_factory(*args: Any, **kwargs: Any) -> InMemorySpanExporter: # type: ignore[type-arg]
1331+
def _exporter_factory(*args: Any, **kwargs: Any) -> InMemorySpanExporter:
13321332
captured.update(kwargs)
13331333
return InMemorySpanExporter()
13341334

0 commit comments

Comments
 (0)