Skip to content

python-v0.3.7

@checkrd-io-bot checkrd-io-bot tagged this 15 May 05:11
Mirror's `Publish Python SDK` and `Publish JavaScript SDK` workflows
gate on mypy strict + eslint --max-warnings 0 before they push to
PyPI / npm. Initial 0.3.7 tag tests failed on these:

Python (mypy strict --no-implicit-reexport):
  `integrations/_base.py` re-exports `CheckrdTransport` and
  `CheckrdAsyncTransport` for downstream instrumentor modules. The
  bare `from checkrd.transports._httpx import X` form is rejected
  by strict mode; switched to `from … import X as X` (mypy's
  documented re-export idiom).
  `integrations/_google_genai.py` iterated `(attr, transport_cls,
  expected_cls)` tuples with both sync + async pairings; mypy widened
  the inferred argument type for the transport constructor to
  `BaseTransport | AsyncBaseTransport` which the typed signatures
  correctly reject. Split into explicit sync and async branches so
  narrowing flows through to each constructor call.

JavaScript (eslint):
  `_ai_sdk.ts`: `if (!x) x = y` -> `x ??= y` (nullish-coalescing).
  `_anthropic.ts`: drop the `as Record<string, unknown>` cast in
  `revertPatch` — `AnthropicModule` is already structurally
  compatible with `patchModuleExport`'s parameter.
  `_base.ts`: replace `globalThis.fetch?.bind(...)` with a `typeof`
  guard so the rebound local is non-nullable; drop the two
  redundant `as typeof fetch` / `as FetchFn` assertions that
  followed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Mirrored from checkrd-io/checkrd@6b5d3498a358fd335b6ad70416e0bd3cdde91985
Assets 2
Loading