Skip to content

Commit bb2df51

Browse files
leslyarungemini-code-assist[bot]
andcommitted
refactor: consolidate SandboxClient import into single if/else block
Co-authored-by: gemini-code-assist[bot] <176aborting...@users.noreply.github.com>
1 parent 668d5f9 commit bb2df51

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/google/adk/code_executors/gke_code_executor.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
from .code_execution_utils import CodeExecutionInput
3030
from .code_execution_utils import CodeExecutionResult
3131

32-
try:
33-
from k8s_agent_sandbox import SandboxClient
34-
except ImportError:
35-
SandboxClient = None
36-
3732
if TYPE_CHECKING:
3833
from k8s_agent_sandbox import SandboxClient
34+
else:
35+
try:
36+
from k8s_agent_sandbox import SandboxClient
37+
except ImportError:
38+
SandboxClient = None
3939

4040
# Expose these for tests to monkeypatch.
4141
client = k8s.client

0 commit comments

Comments
 (0)