MCPcopy Create free account
hub / github.com/catboost/catboost / make_diff

Function make_diff

tools/cpp_style_checker/wrapper.py:66–76  ·  view source on GitHub ↗
(left, right)

Source from the content-addressed store, hash-verified

64
65
66def make_diff(left, right):
67 result = ""
68 for line in difflib.unified_diff(left.decode().splitlines(), right.decode().splitlines(), fromfile='L', tofile='R'):
69 line = line.rstrip("\n")
70 if line:
71 if line[0] == "-":
72 line = "[[bad]]" + line + "[[rst]]"
73 elif line[0] == "+":
74 line = "[[good]]" + line + "[[rst]]"
75 result += line + "\n"
76 return result
77
78
79if __name__ == "__main__":

Callers 1

check_fileFunction · 0.85

Calls 1

decodeMethod · 0.45

Tested by

no test coverage detected