Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Added lint workflow for JS, Python SDKs (#759)

Mish Ushakovb21f86c543e1
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
new file mode 100644
index 000000000..ca87fe1a6
--- /dev/null
+++ b/.github/workflows/lint.yml
@@ -0,0 +1,60 @@
+name: Lint
+
+on:
+ pull_request:
+
+jobs:
+ lint:
+ name: Lint
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout Repo
+ uses: actions/checkout@v4
+
+ - uses: pnpm/action-setup@v3
+ with:
+ version: 9.5
+
+ - name: Setup Node.js 18
+ uses: actions/setup-node@v4
+ with:
+ node-version: '18.x'
+ registry-url: https://registry.npmjs.org
+ cache: pnpm
+
+ - name: Configure pnpm
+ run: |
+ pnpm config set auto-install-peers true
+ pnpm config set exclude-links-from-lockfile true
+
+ - name: Install JS dependencies
+ run: |
+ pnpm install --frozen-lockfile
+
+ - name: Run JS linting
+ run: |
+ pnpm run lint
+
+ - name: Set up Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.9'
+
+ - name: Install and configure Poetry
+ uses: snok/install-poetry@v1
+ with:
+ version: 1.5.1
+ virtualenvs-create: true
+ virtualenvs-in-project: true
+ installer-parallel: true
+
+ - name: Install Python dependencies
+ working-directory: packages/python-sdk
+ run: |
+ poetry install
+
+ - name: Run Python linting
+ working-directory: packages/python-sdk
+ run: |
+ poetry run ruff check .
diff --git a/package.json b/package.json
index 5a5714cb6..a60431468 100644
--- a/package.json
+++ b/package.json
@@ -10,7 +10,8 @@
"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"
+ "generate-sdk-reference": "pnpm --if-present --recursive run generate-sdk-reference",
+ "lint": "pnpm --if-present --recursive run lint"
},
"packageManager": "[email protected]",
"dependencies": {
diff --git a/packages/js-sdk/example.mts b/packages/js-sdk/example.mts
deleted file mode 100644
index 041f21f29..000000000
--- a/packages/js-sdk/example.mts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { Sandbox } from './dist'
-
-import dotenv from 'dotenv'
-
-dotenv.config()
-
-for (let i = 0; i < 10; i++) {
- const start = Date.now()
- const sbx = await Sandbox.create({ timeoutMs: 10000 })
- console.log('time', Date.now() - start)
-}
diff --git a/packages/js-sdk/package.json b/packages/js-sdk/package.json
index 74da8d992..abea36ef2 100644
--- a/packages/js-sdk/package.json
+++ b/packages/js-sdk/package.json
@@ -36,7 +36,8 @@
"postPublish": "./scripts/post-publish.sh || true",
"test:bun": "bun test tests/runtimes/bun --env-file=.env",
"test:deno": "deno test tests/runtimes/deno/ --allow-net --allow-read --allow-env --unstable-sloppy-imports --trace-leaks",
- "test:integration": "E2B_INTEGRATION_TEST=1 vitest run tests/integration/**"
+ "test:integration": "E2B_INTEGRATION_TEST=1 vitest run tests/integration/**",
+ "lint": "eslint src/ tests/"
},
"devDependencies": {
"@testing-library/react": "^16.2.0",
@@ -48,6 +49,7 @@
"@vitejs/plugin-react": "^4.3.4",
"@vitest/browser": "^3.1.1",
"dotenv": "^16.4.5",
+ "eslint": "^8.57.1",
"knip": "^5.43.6",
"npm-check-updates": "^16.14.20",
"openapi-typescript": "^7.6.1",
diff --git a/packages/js-sdk/scripts/CustomMarkdownTheme.js b/packages/js-sdk/scripts/CustomMarkdownTheme.js
index b1a8e0200..092259e55 100644
--- a/packages/js-sdk/scripts/CustomMarkdownTheme.js
+++ b/packages/js-sdk/scripts/CustomMarkdownTheme.js
@@ -1,4 +1,5 @@
-const { MarkdownTheme, MarkdownPageEvent } = require('typedoc-plugin-markdown')
+// eslint-disable-next-line @typescript-eslint/no-var-requires
+const { MarkdownPageEvent } = require('typedoc-plugin-markdown')
function load(app) {
// Listen to the render event
@@ -24,7 +25,7 @@ function removeMarkdownLinks(text) {
return text.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '$1') // Replace with just the link text
}
-function removeFirstNLines(text, n, condition) {
+function removeFirstNLines(text, n) {
// Split the text into lines, then join back excluding the first four lines
return text.split('\n').slice(n).join('\n')
}
diff --git a/packages/js-sdk/tests/integration/stress.test.ts b/packages/js-sdk/tests/integration/stress.test.ts
index 69da1472d..5f5fc211f 100644
--- a/packages/js-sdk/tests/integration/stress.test.ts
+++ b/packages/js-sdk/tests/integration/stress.test.ts
@@ -33,7 +33,7 @@ test.skipIf(!isIntegrationTest)(
}
)
-test.skipIf(!isIntegrationTest)('stress requests to nextjs app', async ({}) => {
+test.skipIf(!isIntegrationTest)('stress requests to nextjs app', async () => {
const hostPromises: Array<Promise<string | void>> = []
for (let i = 0; i < sanboxCount; i++) {
diff --git a/packages/js-sdk/tests/sandbox/files/list.test.ts b/packages/js-sdk/tests/sandbox/files/list.test.ts
index 8fc8c0e10..2f9b649ea 100644
--- a/packages/js-sdk/tests/sandbox/files/list.test.ts
+++ b/packages/js-sdk/tests/sandbox/files/list.test.ts
@@ -1,6 +1,6 @@
-import { assert, onTestFinished } from 'vitest'
+import { assert } from 'vitest'
-import { sandboxTest, wait } from '../../setup.js'
+import { sandboxTest } from '../../setup.js'
const parentDirName = 'test_directory'
diff --git a/packages/js-sdk/tests/setup.ts b/packages/js-sdk/tests/setup.ts
index 176312906..e0ffcd31e 100644
--- a/packages/js-sdk/tests/setup.ts
+++ b/packages/js-sdk/tests/setup.ts
@@ -8,7 +8,8 @@ interface SandboxFixture {
export const sandboxTest = base.extend<SandboxFixture>({
sandbox: [
- async ({ }, use) => {
+ // eslint-disable-next-line no-empty-pattern
+ async ({}, use) => {
const sandbox = await Sandbox.create(template)
try {
await use(sandbox)
@@ -35,4 +36,4 @@ export async function wait(ms: number) {
return new Promise((resolve) => setTimeout(resolve, ms))
}
-export { template }
\ No newline at end of file
+export { template }
diff --git a/packages/python-sdk/Makefile b/packages/python-sdk/Makefile
index c1b169c53..e08911d51 100644
--- a/packages/python-sdk/Makefile
+++ b/packages/python-sdk/Makefile
@@ -7,3 +7,6 @@ generate-api:
init:
pip install openapi-python-client
+
+lint:
+ ruff check .
diff --git a/packages/python-sdk/e2b/__init__.py b/packages/python-sdk/e2b/__init__.py
index 7f5003675..c0c99d875 100644
--- a/packages/python-sdk/e2b/__init__.py
+++ b/packages/python-sdk/e2b/__init__.py
@@ -66,3 +66,44 @@ from .sandbox_async.utils import OutputHandler
from .sandbox_async.main import AsyncSandbox
from .sandbox_async.filesystem.watch_handle import AsyncWatchHandle
from .sandbox_async.commands.command_handle import AsyncCommandHandle
+
+__all__ = [
+ # API
+ "ApiClient",
+ "client",
+ # Connection config
+ "ConnectionConfig",
+ "ProxyTypes",
+ # Exceptions
+ "SandboxException",
+ "TimeoutException",
+ "NotFoundException",
+ "AuthenticationException",
+ "InvalidArgumentException",
+ "NotEnoughSpaceException",
+ "TemplateException",
+ # Sandbox API
+ "SandboxInfo",
+ "ProcessInfo",
+ # Command handle
+ "CommandResult",
+ "Stderr",
+ "Stdout",
+ "CommandExitException",
+ "PtyOutput",
+ "PtySize",
+ # Filesystem
+ "FilesystemEvent",
+ "FilesystemEventType",
+ "EntryInfo",
+ "FileType",
+ # Sync sandbox
+ "Sandbox",
+ "WatchHandle",
+ "CommandHandle",
+ # Async sandbox
+ "OutputHandler",
+ "AsyncSandbox",
+ "AsyncWatchHandle",
+ "AsyncCommandHandle",
+]
diff --git a/packages/python-sdk/e2b/exceptions.py b/packages/python-sdk/e2b/exceptions.py
index d519972b4..b0710ac06 100644
--- a/packages/python-sdk/e2b/exceptions.py
+++ b/packages/python-sdk/e2b/exceptions.py
@@ -6,13 +6,13 @@ def format_sandbox_timeout_exception(message: str):
def format_request_timeout_error() -> Exception:
return TimeoutException(
- f"Request timed out — the 'request_timeout' option can be used to increase this timeout",
+ "Request timed out — the 'request_timeout' option can be used to increase this timeout",
)
def format_execution_timeout_error() -> Exception:
return TimeoutException(
- f"Execution timed out — the 'timeout' option can be used to increase this timeout",
+ "Execution timed out — the 'timeout' option can be used to increase this timeout",
)
diff --git a/packages/python-sdk/e2b/sandbox/sandbox_api.py b/packages/python-sdk/e2b/sandbox/sandbox_api.py
index caaa35442..053560286 100644
--- a/packages/python-sdk/e2b/sandbox/sandbox_api.py
+++ b/packages/python-sdk/e2b/sandbox/sandbox_api.py
@@ -1,6 +1,6 @@
from abc import ABC
from dataclasses import dataclass
-from typing import Optional, Dict, Union, Literal
+from typing import Optional, Dict
from datetime import datetime
from httpx import Limits
diff --git a/packages/python-sdk/e2b/sandbox/signature.py b/packages/python-sdk/e2b/sandbox/signature.py
index 20989d140..d094ee908 100644
--- a/packages/python-sdk/e2b/sandbox/signature.py
+++ b/packages/python-sdk/e2b/sandbox/signature.py
@@ -1,7 +1,6 @@
import base64
import hashlib
import time
-import urllib.parse
from typing import Optional, TypedDict, Literal
diff --git a/packages/python-sdk/e2b/sandbox_async/commands/pty.py b/packages/python-sdk/e2b/sandbox_async/commands/pty.py
index 740a03202..0833f1fee 100644
--- a/packages/python-sdk/e2b/sandbox_async/commands/pty.py
+++ b/packages/python-sdk/e2b/sandbox_async/commands/pty.py
@@ -3,7 +3,6 @@ from typing import Dict, Optional
import e2b_connect
import httpcore
-from typing import Dict, Optional
from e2b.envd.process import process_connect, process_pb2
from e2b.connection_config import (
@@ -14,7 +13,6 @@ from e2b.connection_config import (
)
from e2b.exceptions import SandboxException
from e2b.envd.rpc import authentication_header, handle_rpc_exception
-from e2b.exceptions import SandboxException
from e2b.sandbox.commands.command_handle import PtySize
from e2b.sandbox_async.commands.command_handle import (
AsyncCommandHandle,
diff --git a/packages/python-sdk/poetry.lock b/packages/python-sdk/poetry.lock
index 303ed4e52..aa7cb8f43 100644
--- a/packages/python-sdk/poetry.lock
+++ b/packages/python-sdk/poetry.lock
@@ -943,6 +943,34 @@ urllib3 = ">=1.21.1,<3"
socks = ["PySocks (>=1.5.6,!=1.5.7)"]
use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"]
+[[package]]
+name = "ruff"
+version = "0.11.12"
+description = "An extremely fast Python linter and code formatter, written in Rust."
+optional = false
+python-versions = ">=3.7"
+groups = ["dev"]
+files = [
+ {file = "ruff-0.11.12-py3-none-linux_armv6l.whl", hash = "sha256:c7680aa2f0d4c4f43353d1e72123955c7a2159b8646cd43402de6d4a3a25d7cc"},
+ {file = "ruff-0.11.12-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:2cad64843da9f134565c20bcc430642de897b8ea02e2e79e6e02a76b8dcad7c3"},
+ {file = "ruff-0.11.12-py3-none-macosx_11_0_arm64.whl", hash = "sha256:9b6886b524a1c659cee1758140138455d3c029783d1b9e643f3624a5ee0cb0aa"},
+ {file = "ruff-0.11.12-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3cc3a3690aad6e86c1958d3ec3c38c4594b6ecec75c1f531e84160bd827b2012"},
+ {file = "ruff-0.11.12-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f97fdbc2549f456c65b3b0048560d44ddd540db1f27c778a938371424b49fe4a"},
+ {file = "ruff-0.11.12-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:74adf84960236961090e2d1348c1a67d940fd12e811a33fb3d107df61eef8fc7"},
+ {file = "ruff-0.11.12-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:b56697e5b8bcf1d61293ccfe63873aba08fdbcbbba839fc046ec5926bdb25a3a"},
+ {file = "ruff-0.11.12-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4d47afa45e7b0eaf5e5969c6b39cbd108be83910b5c74626247e366fd7a36a13"},
+ {file = "ruff-0.11.12-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:692bf9603fe1bf949de8b09a2da896f05c01ed7a187f4a386cdba6760e7f61be"},
+ {file = "ruff-0.11.12-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:08033320e979df3b20dba567c62f69c45e01df708b0f9c83912d7abd3e0801cd"},
+ {file = "ruff-0.11.12-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:929b7706584f5bfd61d67d5070f399057d07c70585fa8c4491d78ada452d3bef"},
+ {file = "ruff-0.11.12-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:7de4a73205dc5756b8e09ee3ed67c38312dce1aa28972b93150f5751199981b5"},
+ {file = "ruff-0.11.12-py3-none-musllinux_1_2_i686.whl", hash = "sha256:2635c2a90ac1b8ca9e93b70af59dfd1dd2026a40e2d6eebaa3efb0465dd9cf02"},
+ {file = "ruff-0.11.12-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:d05d6a78a89166f03f03a198ecc9d18779076ad0eec476819467acb401028c0c"},
+ {file = "ruff-0.11.12-py3-none-win32.whl", hash = "sha256:f5a07f49767c4be4772d161bfc049c1f242db0cfe1bd976e0f0886732a4765d6"},
+ {file = "ruff-0.11.12-py3-none-win_amd64.whl", hash = "sha256:5a4d9f8030d8c3a45df201d7fb3ed38d0219bccd7955268e863ee4a115fa0832"},
+ {file = "ruff-0.11.12-py3-none-win_arm64.whl", hash = "sha256:65194e37853158d368e333ba282217941029a28ea90913c67e558c611d04daa5"},
+ {file = "ruff-0.11.12.tar.gz", hash = "sha256:43cf7f69c7d7c7d7513b9d59c5d8cafd704e05944f978614aa9faff6ac202603"},
+]
+
[[package]]
name = "setuptools"
version = "78.1.1"
@@ -950,6 +978,7 @@ description = "Easily download, build, install, upgrade, and uninstall Python pa
optional = false
python-versions = ">=3.9"
groups = ["dev"]
+markers = "python_version < \"3.10\""
files = [
{file = "setuptools-78.1.1-py3-none-any.whl", hash = "sha256:c3a9c4211ff4c309edb8b8c4f1cbfa7ae324c4ba9f91ff254e3d305b9fd54561"},
{file = "setuptools-78.1.1.tar.gz", hash = "sha256:fcc17fd9cd898242f6b4adfaca46137a9edef687f43e6f78469692a5e70d851d"},
@@ -1225,4 +1254,4 @@ type = ["pytest-mypy"]
[metadata]
lock-version = "2.1"
python-versions = "^3.9"
-content-hash = "0fa4670368dc0adfabc7626bea65205cd769253905bb70d99a1c3da34d0594d8"
+content-hash = "9d43737542e60a7da742be97abc39a3ddeef18ad6c9ede85b52a582d95365b36"
diff --git a/packages/python-sdk/pyproject.toml b/packages/python-sdk/pyproject.toml
index a1d5a2ef9..c79328136 100644
--- a/packages/python-sdk/pyproject.toml
+++ b/packages/python-sdk/pyproject.toml
@@ -28,6 +28,7 @@ python-dotenv = "^1.0.0"
pytest-dotenv = "^0.5.2"
pytest-asyncio = "^0.23.7"
pydoc-markdown = "^4.8.2"
+ruff = "^0.11.12"
[build-system]
requires = ["poetry-core"]
diff --git a/packages/python-sdk/tests/async/api_async/test_sbx_kill.py b/packages/python-sdk/tests/async/api_async/test_sbx_kill.py
index 5e9a9d80a..ff86307af 100644
--- a/packages/python-sdk/tests/async/api_async/test_sbx_kill.py
+++ b/packages/python-sdk/tests/async/api_async/test_sbx_kill.py
@@ -5,7 +5,7 @@ from e2b import AsyncSandbox
@pytest.mark.skip_debug()
async def test_kill_existing_sandbox(async_sandbox: AsyncSandbox):
- assert await AsyncSandbox.kill(async_sandbox.sandbox_id) == True
+ assert await AsyncSandbox.kill(async_sandbox.sandbox_id)
list = await AsyncSandbox.list()
assert async_sandbox.sandbox_id not in [s.sandbox_id for s in list]
@@ -13,4 +13,4 @@ async def test_kill_existing_sandbox(async_sandbox: AsyncSandbox):
@pytest.mark.skip_debug()
async def test_kill_non_existing_sandbox():
- assert await AsyncSandbox.kill("non-existing-sandbox") == False
+ assert not await AsyncSandbox.kill("non-existing-sandbox")
diff --git a/packages/python-sdk/tests/async/sandbox_async/commands/test_cmd_kill.py b/packages/python-sdk/tests/async/sandbox_async/commands/test_cmd_kill.py
index e49005c3b..a92f9b5a8 100644
--- a/packages/python-sdk/tests/async/sandbox_async/commands/test_cmd_kill.py
+++ b/packages/python-sdk/tests/async/sandbox_async/commands/test_cmd_kill.py
@@ -16,4 +16,4 @@ async def test_kill_process(async_sandbox: AsyncSandbox):
async def test_kill_non_existing_process(async_sandbox: AsyncSandbox):
non_existing_pid = 999999
- assert await async_sandbox.commands.kill(non_existing_pid) == False
+ assert not await async_sandbox.commands.kill(non_existing_pid)
diff --git a/packages/python-sdk/tests/async/sandbox_async/commands/test_cmd_list.py b/packages/python-sdk/tests/async/sandbox_async/commands/test_cmd_list.py
index 3ac8a1858..8020ec2f6 100644
--- a/packages/python-sdk/tests/async/sandbox_async/commands/test_cmd_list.py
+++ b/packages/python-sdk/tests/async/sandbox_async/commands/test_cmd_list.py
@@ -1,4 +1,3 @@
-import pytest
from e2b import AsyncSandbox
diff --git a/packages/python-sdk/tests/async/sandbox_async/commands/test_send_stdin.py b/packages/python-sdk/tests/async/sandbox_async/commands/test_send_stdin.py
index 58d93abd2..80c624b52 100644
--- a/packages/python-sdk/tests/async/sandbox_async/commands/test_send_stdin.py
+++ b/packages/python-sdk/tests/async/sandbox_async/commands/test_send_stdin.py
@@ -1,4 +1,3 @@
-import pytest
import asyncio
from e2b import AsyncSandbox
diff --git a/packages/python-sdk/tests/async/sandbox_async/files/test_exists.py b/packages/python-sdk/tests/async/sandbox_async/files/test_exists.py
index 346e82dc4..3b81a23f2 100644
--- a/packages/python-sdk/tests/async/sandbox_async/files/test_exists.py
+++ b/packages/python-sdk/tests/async/sandbox_async/files/test_exists.py
@@ -1,4 +1,3 @@
-import pytest
from e2b import AsyncSandbox
diff --git a/packages/python-sdk/tests/async/sandbox_async/files/test_remove.py b/packages/python-sdk/tests/async/sandbox_async/files/test_remove.py
index d808a45b9..752929b97 100644
--- a/packages/python-sdk/tests/async/sandbox_async/files/test_remove.py
+++ b/packages/python-sdk/tests/async/sandbox_async/files/test_remove.py
@@ -1,4 +1,3 @@
-import pytest
from e2b import AsyncSandbox
diff --git a/packages/python-sdk/tests/bugs/test_envelope_decode.py b/packages/python-sdk/tests/bugs/test_envelope_decode.py
index 58af3bd90..6bc359547 100644
--- a/packages/python-sdk/tests/bugs/test_envelope_decode.py
+++ b/packages/python-sdk/tests/bugs/test_envelope_decode.py
@@ -1,4 +1,3 @@
-import uuid
from e2b.sandbox.commands.command_handle import CommandExitException
import pytest
@@ -24,7 +23,7 @@ exit(0)
"""
def pyautogui(self, pyautogui_code: str):
- code_path = f"/home/user/code-4f3a0850-1a83-47b2-8402-67b039a084ae.py"
+ code_path = "/home/user/code-4f3a0850-1a83-47b2-8402-67b039a084ae.py"
print(code_path)
code = self._wrap_pyautogui_code(pyautogui_code)
diff --git a/packages/python-sdk/tests/conftest.py b/packages/python-sdk/tests/conftest.py
index 2ac14646d..ae0c23460 100644
--- a/packages/python-sdk/tests/conftest.py
+++ b/packages/python-sdk/tests/conftest.py
@@ -29,7 +29,7 @@ def sandbox(template, debug):
finally:
try:
sandbox.kill()
- except:
+ except (Exception, RuntimeError):
if not debug:
warning(
"Failed to kill sandbox — this is expected if the test runs with local envd."
@@ -45,7 +45,7 @@ async def async_sandbox(template, debug):
finally:
try:
await sandbox.kill()
- except:
+ except (Exception, RuntimeError):
if not debug:
warning(
"Failed to kill sandbox — this is expected if the test runs with local envd."
diff --git a/packages/python-sdk/tests/sync/api_sync/test_sbx_kill.py b/packages/python-sdk/tests/sync/api_sync/test_sbx_kill.py
index 0958e657c..ab9d18b21 100644
--- a/packages/python-sdk/tests/sync/api_sync/test_sbx_kill.py
+++ b/packages/python-sdk/tests/sync/api_sync/test_sbx_kill.py
@@ -5,7 +5,7 @@ from e2b import Sandbox
@pytest.mark.skip_debug()
def test_kill_existing_sandbox(sandbox: Sandbox):
- assert Sandbox.kill(sandbox.sandbox_id) == True
+ assert Sandbox.kill(sandbox.sandbox_id)
list = Sandbox.list()
assert sandbox.sandbox_id not in [s.sandbox_id for s in list]
@@ -13,4 +13,4 @@ def test_kill_existing_sandbox(sandbox: Sandbox):
@pytest.mark.skip_debug()
def test_kill_non_existing_sandbox():
- assert Sandbox.kill("non-existing-sandbox") == False
+ assert not Sandbox.kill("non-existing-sandbox")
diff --git a/packages/python-sdk/tests/sync/sandbox_sync/commands/test_cmd_kill.py b/packages/python-sdk/tests/sync/sandbox_sync/commands/test_cmd_kill.py
index 9ae629d8e..45e7ca27b 100644
--- a/packages/python-sdk/tests/sync/sandbox_sync/commands/test_cmd_kill.py
+++ b/packages/python-sdk/tests/sync/sandbox_sync/commands/test_cmd_kill.py
@@ -16,4 +16,4 @@ def test_kill_process(sandbox: Sandbox):
def test_kill_non_existing_process(sandbox):
non_existing_pid = 999999
- assert sandbox.commands.kill(non_existing_pid) == False
+ assert not sandbox.commands.kill(non_existing_pid)
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 26b69c1d6..548a0dfbf 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -360,6 +360,9 @@ importers:
dotenv:
specifier: ^16.4.5
version: 16.4.5
+ eslint:
+ specifier: ^8.57.1
+ version: 8.57.1
knip:
specifier: ^5.43.6
version: 5.43.6(@types/[email protected])([email protected])
@@ -392,7 +395,7 @@ importers:
vitest-browser-react:
specifier: ^0.1.1
packages/python-sdk: {}
@@ -11271,7 +11274,7 @@ snapshots:
debug: 4.4.0([email protected])
enhanced-resolve: 5.18.1
eslint: 8.57.1
fast-glob: 3.3.2
get-tsconfig: 4.7.0
@@ -11283,7 +11286,7 @@ snapshots:
- eslint-import-resolver-webpack
- supports-color
dependencies:
debug: 3.2.7
optionalDependencies:
@@ -11304,7 +11307,7 @@ snapshots:
doctrine: 2.1.0
eslint: 8.57.1
eslint-import-resolver-node: 0.3.9
has: 1.0.3
is-core-module: 2.13.0
is-glob: 4.0.3
@@ -15054,7 +15057,7 @@ snapshots:
terser: 5.39.0
yaml: 2.5.1
dependencies:
react: 18.3.1