Use contextlib.suppress for cleaner exception handling

Fixes ruff SIM105 lint warning.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Dan Guido
2026-01-29 20:49:10 -05:00
parent 91ff6f7c0c
commit fefdf3f43d
+2 -3
View File
@@ -7,6 +7,7 @@ Runs on container creation to set up:
- Directory ownership fixes for mounted volumes
"""
import contextlib
import json
import os
import subprocess
@@ -24,10 +25,8 @@ def setup_claude_settings():
# Load existing settings or start fresh
settings = {}
if settings_file.exists():
try:
with contextlib.suppress(json.JSONDecodeError):
settings = json.loads(settings_file.read_text())
except json.JSONDecodeError:
pass
# Set bypassPermissions mode
if "permissions" not in settings: