Skip to content

Commit

Permalink
Add newline behavior consistency to Custodian artifact output
Browse files Browse the repository at this point in the history
  • Loading branch information
pydsigner committed Dec 30, 2023
1 parent 0b3d93d commit 113cfd5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/anchovy/custody.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class Custodian:
Class for managing custody info and intelligent rebuilds.
"""
encoding = 'utf-8'
newline = '\n'
context: 'Context'

def __init__(self,
Expand Down Expand Up @@ -193,7 +194,7 @@ def dump_file(self, path: Path):
'graph': self.graph,
'meta': self.meta,
}
with path.open('w', encoding=self.encoding) as file:
with path.open('w', encoding=self.encoding, newline=self.newline) as file:
json.dump(data, file, indent=2)

def update_meta(self, entry: CustodyEntry):
Expand Down

0 comments on commit 113cfd5

Please sign in to comment.