-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbusca_py.pyi
31 lines (27 loc) · 888 Bytes
/
busca_py.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from typing import Optional
class FileMatch:
"""
Data structure to represent a file's match to the reference string lines. It has three attributes:
...
Attributes
----------
path : str
a string of the path to the file
percent_match : float
the ratio of line similarity between the sequences
lines : str
the contents of the file
"""
path: str
percent_match: float
lines: str
def __new__(cls, path: str, percent_match: float, lines: str) -> FileMatch: ...
def search_for_lines(
reference_string: str,
search_path: str,
max_lines: Optional[int] = None,
count: Optional[int] = None,
include_globs: Optional[list[str]] = None,
exclude_globs: Optional[list[str]] = None,
) -> list[FileMatch]:
"""Search for files with content that most closely match the lines of a reference string."""