MCPcopy Create free account
hub / github.com/C3ting/ARL / human_content

Method human_content

app/services/githubSearch.py:74–86  ·  view source on GitHub ↗
(self, keyword)

Source from the content-addressed store, hash-verified

72 return self._commit_date
73
74 def human_content(self, keyword):
75 lines = self.content.split("\n")
76 max_len = 8
77 before_lines = deque(maxlen=max_len)
78 index = 0
79 for line in lines:
80 if keyword in line:
81 break
82 before_lines.append(line)
83 index += 1
84
85 after_lines = lines[index:index + max_len]
86 return "{}\n{}".format("\n".join(before_lines), "\n".join(after_lines))
87
88 def to_dict(self):
89 item = {

Callers 2

result_to_dictMethod · 0.45
build_html_reportMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected