From d11bc53050bc2eb67b4c4ce62a2cd3b899a16ede Mon Sep 17 00:00:00 2001 From: hobostay Date: Tue, 31 Mar 2026 17:44:30 +0800 Subject: [PATCH] Fix bare except clause in text.py Replace bare `except:` with `except Exception:` to avoid catching system-exiting exceptions like KeyboardInterrupt and SystemExit. This follows PEP 8 best practices which recommend against bare except clauses as they can mask unexpected errors and make debugging more difficult. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/build123d/text.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build123d/text.py b/src/build123d/text.py index 74f29a05..2ecd0c6a 100644 --- a/src/build123d/text.py +++ b/src/build123d/text.py @@ -194,7 +194,7 @@ class FontManager: for record in ft_font["name"].names: try: value = record.toUnicode() - except: + except Exception: continue if record.nameID == 1 and family == "":