export: columns are now in alphabetical order when exporting to tab
format
This commit is contained in:
@ -23,16 +23,17 @@ cdef class TabFormat:
|
|||||||
@cython.boundscheck(False)
|
@cython.boundscheck(False)
|
||||||
def __call__(self, object data):
|
def __call__(self, object data):
|
||||||
|
|
||||||
cdef set ktags
|
cdef object ktags
|
||||||
cdef list tags = [key for key in data]
|
cdef list tags = [key for key in data]
|
||||||
|
|
||||||
line = []
|
line = []
|
||||||
|
if self.tags != None and self.tags:
|
||||||
if self.tags is not None and self.tags:
|
ktags = list(self.tags)
|
||||||
ktags = self.tags
|
|
||||||
else:
|
else:
|
||||||
ktags = set(tags)
|
ktags = list(set(tags))
|
||||||
|
|
||||||
|
ktags.sort()
|
||||||
|
|
||||||
if self.header and self.first_line:
|
if self.header and self.first_line:
|
||||||
for k in ktags:
|
for k in ktags:
|
||||||
if k in tags:
|
if k in tags:
|
||||||
|
Reference in New Issue
Block a user