From 3a6cbf16e27e164e81ac2259fe211cd930adf48f Mon Sep 17 00:00:00 2001 From: Taneem Ibrahim Date: Mon, 2 Mar 2026 23:58:42 -0600 Subject: [PATCH] [MISC] Removed unused function find_all_indices() from tool_parsers/utils.py (#35683) Signed-off-by: Taneem Ibrahim --- vllm/tool_parsers/utils.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/vllm/tool_parsers/utils.py b/vllm/tool_parsers/utils.py index cbbf5b545..49dd023d4 100644 --- a/vllm/tool_parsers/utils.py +++ b/vllm/tool_parsers/utils.py @@ -93,21 +93,6 @@ def extract_intermediate_diff(curr: str, old: str) -> str: return diff -def find_all_indices(string: str, substring: str) -> list[int]: - """ - Find all (starting) indices of a substring in a given string. Useful for - tool call extraction - """ - indices = [] - index = -1 - while True: - index = string.find(substring, index + 1) - if index == -1: - break - indices.append(index) - return indices - - # partial_json_parser doesn't support extra data and # JSONDecoder.raw_decode doesn't support partial JSON def partial_json_loads(input_str: str, flags: Allow) -> tuple[Any, int]: