Skip to content

Commit fefdf3f

Browse files
dguidoclaude
andcommitted
Use contextlib.suppress for cleaner exception handling
Fixes ruff SIM105 lint warning. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 91ff6f7 commit fefdf3f

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

post_install.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- Directory ownership fixes for mounted volumes
88
"""
99

10+
import contextlib
1011
import json
1112
import os
1213
import subprocess
@@ -24,10 +25,8 @@ def setup_claude_settings():
2425
# Load existing settings or start fresh
2526
settings = {}
2627
if settings_file.exists():
27-
try:
28+
with contextlib.suppress(json.JSONDecodeError):
2829
settings = json.loads(settings_file.read_text())
29-
except json.JSONDecodeError:
30-
pass
3130

3231
# Set bypassPermissions mode
3332
if "permissions" not in settings:

0 commit comments

Comments
 (0)