Skip to content

Commit a4dac78

Browse files
fix(tracing): import APIError from scale_gp_beta public module (CI lint)
CI pyright reports reportPrivateImportUsage on `from scale_gp_beta._exceptions import APIError` because the `_exceptions` submodule is private. Re-export of `APIError` is available at the package root, so use that instead.
1 parent 82e2f8e commit a4dac78

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/agentex/lib/core/tracing/processors/sgp_tracing_processor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
from typing import Optional, override
55

66
import scale_gp_beta.lib.tracing as tracing
7-
from scale_gp_beta import SGPClient, AsyncSGPClient
8-
from scale_gp_beta._exceptions import APIError
7+
from scale_gp_beta import APIError, SGPClient, AsyncSGPClient
98
from scale_gp_beta.lib.tracing import create_span, flush_queue
109
from scale_gp_beta.lib.tracing.span import Span as SGPSpan
1110

tests/lib/core/tracing/processors/test_sgp_tracing_processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ async def test_shutdown_before_any_event_is_noop(self):
406406
async def test_apierror_triggers_retry_then_drops_batch_on_exhaustion(self):
407407
"""`APIError` must be retried up to DEFAULT_RETRIES times. After
408408
exhaustion, the batch is dropped and the worker continues."""
409-
from scale_gp_beta._exceptions import APIError
409+
from scale_gp_beta import APIError
410410

411411
processor, client = TestSGPAsyncTracingProcessorBatching._make_processor()
412412

0 commit comments

Comments
 (0)