c38a1819b6
## 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>
39 lines
1.4 KiB
JSON
39 lines
1.4 KiB
JSON
{
|
|
"name": "e2b",
|
|
"private": true,
|
|
"scripts": {
|
|
"version": "pnpm changeset version && pnpm run -r postVersion",
|
|
"publish": "pnpm changeset publish && pnpm run -r postPublish",
|
|
"test": "pnpm test --recursive --if-present",
|
|
"dev:web": "pnpm --prefix apps/web run dev",
|
|
"build:web": "pnpm --prefix apps/web run build",
|
|
"start:web": "pnpm --prefix apps/web run start",
|
|
"rm-node-modules": "find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +",
|
|
"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",
|
|
"generate-sdk-reference": "pnpm --if-present --recursive run generate-sdk-reference",
|
|
"lint": "pnpm --if-present --recursive run lint",
|
|
"typecheck": "pnpm --if-present --recursive run typecheck",
|
|
"format": "pnpm --if-present --recursive run format",
|
|
"changeset": "pnpx @changesets/cli"
|
|
},
|
|
"packageManager": "pnpm@9.15.5",
|
|
"dependencies": {
|
|
"@changesets/read": "^0.6.2"
|
|
},
|
|
"devDependencies": {
|
|
"@typescript-eslint/eslint-plugin": "^6.7.2",
|
|
"@typescript-eslint/parser": "^6.7.2",
|
|
"changeset": "^0.2.6",
|
|
"eslint": "^8.57.1",
|
|
"eslint-plugin-unused-imports": "^3.0.0"
|
|
},
|
|
"engines": {
|
|
"pnpm": ">=9.0.0 <10"
|
|
},
|
|
"pnpm": {
|
|
"overrides": {
|
|
"@next/eslint-plugin-next>glob@*": "10.5.0"
|
|
}
|
|
}
|
|
}
|