Skip to content

Commit

Permalink
FIX: Windows line endings for symbol mapping tools
Browse files Browse the repository at this point in the history
  • Loading branch information
nmacholl committed Oct 26, 2023
1 parent 19de835 commit 9741f40
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions databento/common/symbology.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import datetime as dt
import functools
import json
import os
from collections import defaultdict
from collections.abc import Mapping
from io import TextIOWrapper
Expand Down Expand Up @@ -452,7 +451,11 @@ def map_symbols_csv(
out_fields = (*in_fields, "symbol")

with out_file_valid.open("w") as output:
writer = csv.DictWriter(output, fieldnames=out_fields)
writer = csv.DictWriter(
output,
fieldnames=out_fields,
lineterminator="\n",
)
writer.writeheader()

for row in reader:
Expand Down Expand Up @@ -533,7 +536,7 @@ def map_symbols_json(
output,
separators=(",", ":"),
)
output.write(os.linesep)
output.write("\n")

return out_file_valid

Expand Down

0 comments on commit 9741f40

Please sign in to comment.