Skip to content

Commit

Permalink
Merge pull request #350 from ajparsons/windows-newline
Browse files Browse the repository at this point in the history
Resolves issue where CSVs saved in Windows have blank lines
  • Loading branch information
Bjwebb authored Jun 12, 2020
2 parents ba3d46a + 9242551 commit 5a9a25f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- All code has had black and isort applied. These have been added to Travis.

## Fixed

- Remove extra lines in CSVs under Windows https://github.com/OpenDataServices/flatten-tool/pull/350

## [0.11.0] - 2020-02-21

### Added
Expand Down
5 changes: 1 addition & 4 deletions flattentool/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,7 @@ def merge(base, mergee, debug_info=None):
+ id_info
)
warnings_for_ignored_columns(
v,
"because another column treats it as an array or object".format(
key
),
v, "because another column treats it as an array or object"
)
continue
base_value = base[key].cell_value
Expand Down
1 change: 1 addition & 0 deletions flattentool/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def write_sheet(self, sheet_name, sheet):
with open(
os.path.join(self.output_name, self.sheet_prefix + sheet_name + ".csv"),
"w",
newline="",
encoding="utf-8",
) as csv_file:
dictwriter = csv.DictWriter(csv_file, sheet_header)
Expand Down

0 comments on commit 5a9a25f

Please sign in to comment.