SandboxFileSystemGrepMatch

class baseten.sandbox.SandboxFileSystemGrepMatch(*, path, line, column, text, context)

Bases: object

A matching line found by SandboxFileSystem.grep().

Parameters:
context: str | None

The matching line with the lines around it, newline-separated.

Holds up to context_lines lines before and after the match, and is None when context_lines was not set.

line: int

Line number, starting at 1.

path: str

Path relative to the searched path.

text: str

The matching line.