Refactor code to remove alerts as per lgtm and #1176.
This commit is contained in:
parent
dcde526f6d
commit
74eebfed6d
54 changed files with 226 additions and 264 deletions
|
|
@ -157,8 +157,9 @@ class ANSITextWrapper(TextWrapper):
|
|||
whitespace characters to spaces. Eg. " foo\tbar\n\nbaz"
|
||||
becomes " foo bar baz".
|
||||
"""
|
||||
# ignore expand_tabs/replace_whitespace until ANSISTring handles them
|
||||
return text
|
||||
##TODO: Ignore expand_tabs/replace_whitespace until ANSISTring handles them.
|
||||
## - don't remove this code. /Griatch
|
||||
# if self.expand_tabs:
|
||||
# text = text.expandtabs()
|
||||
# if self.replace_whitespace:
|
||||
|
|
@ -1269,9 +1270,8 @@ class EvTable(object):
|
|||
for ix, col in enumerate(self.worktable):
|
||||
try:
|
||||
col.reformat(width=cwidths[ix], **options)
|
||||
except Exception as e:
|
||||
msg = "ix=%s, width=%s: %s" % (ix, cwidths[ix], e.message)
|
||||
raise #Exception ("Error in horizontal allign:\n %s" % msg)
|
||||
except Exception:
|
||||
raise
|
||||
|
||||
# equalize heights for each row (we must do this here, since it may have changed to fit new widths)
|
||||
cheights = [max(cell.get_height() for cell in (col[iy] for col in self.worktable)) for iy in range(nrowmax)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue