Skip to content

Commit

Permalink
Fix SIM105
Browse files Browse the repository at this point in the history
  • Loading branch information
Smartappli authored Jun 29, 2024
1 parent 7bfbc59 commit 3b4d2a4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/syft/src/syft/serde/recursive.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# stdlib
from collections.abc import Callable
from contextlib import suppress
from enum import Enum
from enum import EnumMeta
import sys
Expand Down Expand Up @@ -313,10 +314,8 @@ def rs_proto2object(proto: _DynamicStructBuilder) -> Any:

for load_user_code in CODE_RELOADER.values():
load_user_code()
try:
with suppress(Exception): # nosec
class_type = getattr(sys.modules[".".join(module_parts)], klass)
except Exception: # nosec
pass

if proto.fullyQualifiedName not in TYPE_BANK:
raise Exception(f"{proto.fullyQualifiedName} not in TYPE_BANK")
Expand Down

0 comments on commit 3b4d2a4

Please sign in to comment.