fmt
All checks were successful
Deploy to core / deploy (push) Successful in 2m0s

This commit is contained in:
2024-02-21 10:27:16 +03:00
parent 4f26812340
commit 7cf702eb98
35 changed files with 1059 additions and 825 deletions

View File

@@ -29,19 +29,19 @@ def apply_diff(original, diff):
The modified string.
"""
result = []
pattern = re.compile(r'^(\+|-) ')
pattern = re.compile(r"^(\+|-) ")
for line in diff:
match = pattern.match(line)
if match:
op = match.group(1)
content = line[2:]
if op == '+':
if op == "+":
result.append(content)
elif op == '-':
elif op == "-":
# Ignore deleted lines
pass
else:
result.append(line)
return ' '.join(result)
return " ".join(result)