From fefdf3f43d5978b763a1594262da0f12811d078c Mon Sep 17 00:00:00 2001 From: Dan Guido Date: Thu, 29 Jan 2026 20:49:10 -0500 Subject: [PATCH] Use contextlib.suppress for cleaner exception handling Fixes ruff SIM105 lint warning. Co-Authored-By: Claude Opus 4.5 --- post_install.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/post_install.py b/post_install.py index 1e98f24..31a1e02 100644 --- a/post_install.py +++ b/post_install.py @@ -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: