Merge pull request #130 from koic/reduce_any_p
Combine redundant `any?` calls
This commit is contained in:
commit
eab21be94f
1 changed files with 1 additions and 3 deletions
|
|
@ -320,10 +320,8 @@ module MCP
|
|||
|
||||
def accepts_server_context?(method_object)
|
||||
parameters = method_object.parameters
|
||||
accepts_server_context = parameters.any? { |_type, name| name == :server_context }
|
||||
has_kwargs = parameters.any? { |type, _| type == :keyrest }
|
||||
|
||||
accepts_server_context || has_kwargs
|
||||
parameters.any? { |type, name| type == :keyrest || name == :server_context }
|
||||
end
|
||||
|
||||
def call_tool_with_args(tool, arguments)
|
||||
|
|
|
|||
Loading…
Reference in a new issue