mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-04-30 23:02:50 +00:00
linted
This commit is contained in:
@@ -262,7 +262,9 @@ class GrepTool(BaseTool):
|
||||
return sorted(files)
|
||||
|
||||
@staticmethod
|
||||
def _safe_search(compiled_pattern: re.Pattern[str], line: str) -> re.Match[str] | None:
|
||||
def _safe_search(
|
||||
compiled_pattern: re.Pattern[str], line: str
|
||||
) -> re.Match[str] | None:
|
||||
"""Run a regex search with a per-line timeout to mitigate ReDoS.
|
||||
|
||||
On platforms that support SIGALRM (Unix), a timeout is enforced.
|
||||
|
||||
Reference in New Issue
Block a user