@@ -252,9 +252,7 @@ def _extract_explicit_name_from_decorator(
252252 func = decorator .func
253253
254254 # Check for @tool(...) pattern
255- is_direct_decorator = (
256- isinstance (func , ast .Name ) and func .id == expected_decorator
257- )
255+ is_direct_decorator = isinstance (func , ast .Name ) and func .id == expected_decorator
258256
259257 # Check for @golf.tool(...) pattern
260258 is_qualified_decorator = (
@@ -268,9 +266,7 @@ def _extract_explicit_name_from_decorator(
268266 # Check for positional arg: @tool("name")
269267 if decorator .args :
270268 first_arg = decorator .args [0 ]
271- if isinstance (first_arg , ast .Constant ) and isinstance (
272- first_arg .value , str
273- ):
269+ if isinstance (first_arg , ast .Constant ) and isinstance (first_arg .value , str ):
274270 return first_arg .value
275271 else :
276272 # Non-string or dynamic value
@@ -283,9 +279,7 @@ def _extract_explicit_name_from_decorator(
283279 # Check for keyword arg: @tool(name="name")
284280 for keyword in decorator .keywords :
285281 if keyword .arg == "name" :
286- if isinstance (keyword .value , ast .Constant ) and isinstance (
287- keyword .value .value , str
288- ):
282+ if isinstance (keyword .value , ast .Constant ) and isinstance (keyword .value .value , str ):
289283 return keyword .value .value
290284 else :
291285 # Non-string or dynamic value
0 commit comments