2023-08-23 11:50:04 +02:00
|
|
|
{
|
2023-11-06 15:07:09 +01:00
|
|
|
"name": "e2b",
|
2023-08-23 11:50:04 +02:00
|
|
|
"private": true,
|
|
|
|
|
"scripts": {
|
2025-11-04 21:23:24 +01:00
|
|
|
"version": "pnpm changeset version && pnpm run -r postVersion",
|
|
|
|
|
"publish": "pnpm changeset publish && pnpm run -r postPublish",
|
2023-09-21 18:04:11 +02:00
|
|
|
"test": "pnpm test --recursive --if-present",
|
2023-09-27 11:04:11 +02:00
|
|
|
"rm-node-modules": "find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +",
|
2024-10-15 10:17:45 -07:00
|
|
|
"pnpm-install-hack": "cd packages/js-sdk && sed -i '' 's/\"version\": \".*\"/\"version\": \"9.9.9\"/g' package.json && cd ../.. && pnpm i && git checkout -- packages/js-sdk/package.json",
|
2025-08-31 21:06:00 +02:00
|
|
|
"lint": "pnpm --if-present --recursive run lint",
|
Fix Python SDK type issues with ty type checker (#1122)
## Summary
- Resolved 43 type diagnostics reported by ty (Astral's Python type
checker)
- Fixed Self type issues on class singletons
- Added explicit type annotations for shadowed attributes
- Replaced None with UNSET for auto-generated API parameters
- Fixed method signature alignment for protocol matching
- Added targeted type: ignore suppressions for pattern-based limitations
All checks pass: ty check, ruff format, ruff check.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Mostly typing/CI changes, but some adjustments affect sandbox
connect/pause overload dispatch and API response/parameter handling
(`UNSET` vs `None`), which could alter edge-case runtime behavior.
>
> **Overview**
> Fixes Python SDK static typing issues for Astral’s `ty` checker and
wires typechecking into CI.
>
> Adds a new `Typecheck` GitHub Action plus workspace `typecheck`
scripts (TS packages via `tsc`, Python SDK via `make typecheck` running
`ty`), and publishes a patch changeset for `@e2b/python-sdk`.
>
> Across the Python SDK, adjusts type annotations and overloads (e.g.,
`Self`/singleton typing, `connect` overloads, optional
`user`/token/domain handling), tightens API model parsing with
`cast`/`Optional` checks and `UNSET` usage, and adds a few targeted `ty`
ignore comments in tests/protocols to silence checker limitations.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
f66402847c40cee7e44e1aaa7caa97e271ba9978. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-12 17:23:39 +01:00
|
|
|
"typecheck": "pnpm --if-present --recursive run typecheck",
|
2025-11-04 21:23:24 +01:00
|
|
|
"format": "pnpm --if-present --recursive run format",
|
2026-03-09 19:45:00 +00:00
|
|
|
"changeset": "pnpm dlx @changesets/cli"
|
2023-08-23 11:50:04 +02:00
|
|
|
},
|
2025-02-10 14:01:41 -08:00
|
|
|
"packageManager": "pnpm@9.15.5",
|
2023-08-23 11:50:04 +02:00
|
|
|
"dependencies": {
|
2025-02-04 22:36:40 -08:00
|
|
|
"@changesets/read": "^0.6.2"
|
2023-09-14 12:51:07 +02:00
|
|
|
},
|
|
|
|
|
"devDependencies": {
|
2023-09-20 11:21:23 +02:00
|
|
|
"@typescript-eslint/eslint-plugin": "^6.7.2",
|
|
|
|
|
"@typescript-eslint/parser": "^6.7.2",
|
2023-09-21 13:57:45 +02:00
|
|
|
"changeset": "^0.2.6",
|
2025-02-05 10:22:20 -08:00
|
|
|
"eslint": "^8.57.1",
|
2023-10-25 22:58:05 -07:00
|
|
|
"eslint-plugin-unused-imports": "^3.0.0"
|
2024-10-15 08:29:46 -07:00
|
|
|
},
|
|
|
|
|
"engines": {
|
|
|
|
|
"pnpm": ">=9.0.0 <10"
|
2025-12-16 17:53:48 +01:00
|
|
|
},
|
|
|
|
|
"pnpm": {
|
|
|
|
|
"overrides": {
|
2026-03-27 11:23:22 +01:00
|
|
|
"@next/eslint-plugin-next>glob@*": "10.5.0",
|
|
|
|
|
"rollup@>=4": ">=4.59.0"
|
2025-12-16 17:53:48 +01:00
|
|
|
}
|
2023-08-23 11:50:04 +02:00
|
|
|
}
|
2024-10-15 08:29:46 -07:00
|
|
|
}
|