MCPcopy Index your code
hub / github.com/googleapis/google-api-python-client / get_lines

Function get_lines

samples-index.py:65–83  ·  view source on GitHub ↗

Return lines that begin with name. Lines are expected to look like: name: space separated values Args: name: string, parameter name. lines: iterable of string, lines in the file. Returns: List of values in the lines that match.

(name, lines)

Source from the content-addressed store, hash-verified

63
64
65def get_lines(name, lines):
66 """Return lines that begin with name.
67
68 Lines are expected to look like:
69
70 name: space separated values
71
72 Args:
73 name: string, parameter name.
74 lines: iterable of string, lines in the file.
75
76 Returns:
77 List of values in the lines that match.
78 """
79 retval = []
80 matches = itertools.ifilter(lambda x: x.startswith(name + ":"), lines)
81 for line in matches:
82 retval.extend(line[len(name) + 1 :].split())
83 return retval
84
85
86def wiki_escape(s):

Callers 1

scan_readme_filesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…