mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-21 16:34:54 +00:00
Solved ruff E741
This commit is contained in:
@@ -88,7 +88,7 @@ def render_templates(src_dir, dst_dir, context):
|
|||||||
with open(dst_file) as f_old:
|
with open(dst_file) as f_old:
|
||||||
old_lines = f_old.readlines()
|
old_lines = f_old.readlines()
|
||||||
new_lines = rendered.splitlines(keepends=True)
|
new_lines = rendered.splitlines(keepends=True)
|
||||||
additions = [l for l in new_lines if l not in old_lines]
|
additions = [line for line in new_lines if line not in old_lines]
|
||||||
if additions:
|
if additions:
|
||||||
with open(dst_file, 'a') as f:
|
with open(dst_file, 'a') as f:
|
||||||
f.writelines(additions)
|
f.writelines(additions)
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ def render_templates(src_dir, dst_dir, context):
|
|||||||
with open(dst_file) as f_old:
|
with open(dst_file) as f_old:
|
||||||
old_lines = f_old.readlines()
|
old_lines = f_old.readlines()
|
||||||
new_lines = rendered.splitlines(keepends=True)
|
new_lines = rendered.splitlines(keepends=True)
|
||||||
additions = [l for l in new_lines if l not in old_lines]
|
additions = [line for line in new_lines if line not in old_lines]
|
||||||
if additions:
|
if additions:
|
||||||
with open(dst_file, 'a') as f:
|
with open(dst_file, 'a') as f:
|
||||||
f.writelines(additions)
|
f.writelines(additions)
|
||||||
|
|||||||
Reference in New Issue
Block a user