Skip to content

Commit 8637653

Browse files
committed
feat(tools): address nit
1 parent 296853b commit 8637653

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/strands/tools/decorator.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,7 @@ def __init__(self, func: Callable[..., Any], context_param: str | None = None) -
102102
"""
103103
self.func = func
104104
self.signature = inspect.signature(func)
105-
# Preserve Annotated extras when possible (Python 3.9+ / 3.10+ support include_extras)
106-
try:
107-
self.type_hints = get_type_hints(func, include_extras=True)
108-
except TypeError:
109-
# Older Python versions / typing implementations may not accept include_extras
110-
self.type_hints = get_type_hints(func)
105+
self.type_hints = get_type_hints(func, include_extras=True)
111106
self._context_param = context_param
112107

113108
self._validate_signature()

0 commit comments

Comments
 (0)