Skip to content

Commit 6b72c43

Browse files
codewizdaveclaude
andcommitted
Fix ruff BLE001: catch specific exceptions instead of blind Exception
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0cc5233 commit 6b72c43

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/typemap/src/typemap/type_eval/_eval_operators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,13 +1302,13 @@ def _eval_DeepPartial(tp, *, ctx):
13021302
try:
13031303
nested_partial = _eval_DeepPartial(type_result, ctx=ctx)
13041304
new_annotations[name] = nested_partial | None
1305-
except Exception:
1305+
except NameError, TypeError:
13061306
# If recursion fails, just make optional
13071307
new_annotations[name] = type_result | None
13081308
else:
13091309
# No nested fields, just make optional
13101310
new_annotations[name] = type_result | None
1311-
except Exception:
1311+
except NameError, TypeError, AttributeError:
13121312
# If we can't inspect it, just make optional
13131313
new_annotations[name] = type_result | None
13141314
else:

0 commit comments

Comments
 (0)