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 ca0940f commit 8ae23c8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/syft/src/syft/service/request/request.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
import hashlib
import inspect
Expand Down Expand Up @@ -1106,10 +1107,8 @@ def type_for_field(object_type: type, attr_name: str) -> type | None:
try:
field_type = object_type.__dict__["__annotations__"][attr_name]
except Exception: # nosec
try:
with suppress(Exception): # nosec
field_type = object_type.__fields__.get(attr_name, None).type_
except Exception: # nosec
pass
return field_type


Expand Down

0 comments on commit 8ae23c8

Please sign in to comment.