MCPcopy Create free account
hub / github.com/apache/solr / edit

Function edit

dev-tools/scripts/addVersion.py:33–37  ·  view source on GitHub ↗
(buffer, match, line)

Source from the content-addressed store, hash-verified

31 matcher = re.compile(constant_prefix)
32
33 def edit(buffer, match, line):
34 if new_version.dot in line:
35 return None
36 buffer.append(line.replace(match.group(1), new_version.dot))
37 return True
38
39 changed = update_file(filename, matcher, edit)
40 print('done' if changed else 'uptodate')

Callers 1

update_fileFunction · 0.70

Calls 3

appendMethod · 0.65
replaceMethod · 0.45
searchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…