Skip to content

Commit

Permalink
fix(misc): syntax;
Browse files Browse the repository at this point in the history
- TypeError fix.
  • Loading branch information
JVickery-TBS committed Nov 26, 2024
1 parent 19b87fc commit 37bcb33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckanext/recombinant/write_excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,15 @@ def estimate_width_from_length(length):
range2 * ESTIMATE_WIDTH_MULTIPLE_2)

def estimate_width(text):
return max(estimate_width_from_length(len(s)) for s in text.split('\n'))
return max(estimate_width_from_length(len(s)) for s in str(text).split('\n'))

def wrap_text_to_width(text, width):
# assuming width > ESTIMATE_WIDTH_MULTIPLE_1_CHARS
width -= ESTIMATE_WIDTH_MULTIPLE_1_CHARS * ESTIMATE_WIDTH_MULTIPLE_1
cwidth = width // ESTIMATE_WIDTH_MULTIPLE_2 + ESTIMATE_WIDTH_MULTIPLE_1_CHARS
return '\n'.join(
'\n'.join(textwrap.wrap(line, cwidth))
for line in text.split('\n'))
for line in str(text).split('\n'))


def _build_styles(book, geno):
Expand Down

0 comments on commit 37bcb33

Please sign in to comment.