Skip to content

Commit

Permalink
fixup! Use proper configurations for csv reading/writing (#427)
Browse files Browse the repository at this point in the history
  • Loading branch information
jessebrennan committed Nov 15, 2019
1 parent b41a3e9 commit cf79d1e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions hca/util/tsv.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import csv
import functools


# Wrap the csv library with our required options

DictReader = functools.partial(csv.DictReader, delimiter='\t', dialect='excel-tab')
DictWriter = functools.partial(csv.DictWriter, delimiter='\t', dialect='excel-tab')
def DictReader(f):
return csv.DictReader(f, delimiter='\t', dialect='excel-tab')


def DictWriter(f, fieldnames):
return csv.DictWriter(f, fieldnames, delimiter='\t', dialect='excel-tab')

0 comments on commit cf79d1e

Please sign in to comment.