Skip to content

Commit 35014ba

Browse files
author
James Bradbury
authored
[Fix] LF line ending enforcement (#149)
* typos in knnclassifier~ * enforce newline='\n' on template writing
1 parent 8fde3f4 commit 35014ba

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

flucoma/FluidRefData.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ def process_template(template_path,outputdir,client_data,host):
545545

546546
template = env.get_template(host['template'])
547547

548-
with open(ofile,'w') as f:
548+
with open(ofile,'w', newline='\n') as f:
549549
f.write(template.render(client_data))
550550
# arguments=client_data['arguments'],
551551
# attributes=client_data['attributes'],
@@ -585,7 +585,7 @@ def process_topic(topic_file,template_path,outputdir,host):
585585
else:
586586
raise NameError('{} not found'.format(topic_file))
587587

588-
with open(ofile,'w') as f:
588+
with open(ofile,'w', newline='\n') as f:
589589
f.write(template.render(
590590
title=topic_data['title'],
591591
digest=topic_data['digest'],

flucoma/doc/render.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def client(client, client_index, args, driver):
7777
client_data['messages'] = ContextView(client_data.pop('messages'))
7878

7979
with add_context(client):
80-
with open(ofile,'w',encoding='utf-8') as f:
80+
with open(ofile,'w',encoding='utf-8', newline='\n') as f:
8181
f.write(template.render(client_data,
8282
index=client_index,
8383
driver = driver,
@@ -98,7 +98,7 @@ def topic(topic_data,client_index,args,driver):
9898
template = env.get_template(driver['topic_template'])
9999
logging.info(f"{topic_data['name']}: Making {ofile}")
100100

101-
with open(ofile,'w',encoding='utf-8') as f:
101+
with open(ofile,'w',encoding='utf-8', newline='\n') as f:
102102
f.write(template.render(
103103
title=topic_data['title'],
104104
digest=topic_data['digest'],

0 commit comments

Comments
 (0)