From 0aaba52249736bbfa4254eb05c74ed8f5d32213a Mon Sep 17 00:00:00 2001 From: Alexander Watson Date: Tue, 31 Mar 2026 10:06:46 -0700 Subject: [PATCH] fix(sdk): use contextlib.suppress per SIM105 lint rule Signed-off-by: Alexander Watson --- python/openshell/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python/openshell/__init__.py b/python/openshell/__init__.py index 7dbcd97f3..8f9f8eb9d 100644 --- a/python/openshell/__init__.py +++ b/python/openshell/__init__.py @@ -5,7 +5,11 @@ from __future__ import annotations -try: +import contextlib + +# Proto stubs may not be generated yet (requires Rust build). +# Suppress so subpackages like openshell.prover can still be imported. +with contextlib.suppress(ImportError): from .sandbox import ( ClusterInferenceConfig, ExecChunk, @@ -18,10 +22,6 @@ try: SandboxSession, TlsConfig, ) -except ImportError: - # Proto stubs not yet generated (requires Rust build). - # Subpackages like openshell.prover can still be imported. - pass try: from importlib.metadata import version