Skip to content

Commit

Permalink
feat(py3): basetring to str;
Browse files Browse the repository at this point in the history
- Changed `basestring` usage to just `str`.
  • Loading branch information
JVickery-TBS committed Nov 22, 2023
1 parent 4eb39fe commit b7292ec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ckanext/recombinant/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def canonicalize(
# use common value for blank cells
dirty = u""

if isinstance(dirty, basestring):
if isinstance(dirty, str):
if not dirty.strip():
# whitespace-only values
dirty = u""
Expand Down
4 changes: 2 additions & 2 deletions ckanext/recombinant/write_excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,10 +880,10 @@ def fill_cell(sheet, row, column, value, style):
:return: None
"""
c = sheet.cell(row=row, column=column)
if isinstance(value, basestring):
if isinstance(value, str):
value = value.replace(u'\n', u'\r\n')
c.value = value
if isinstance(style, basestring):
if isinstance(style, str):
c.style = style
else:
apply_style(c, style)
Expand Down
2 changes: 1 addition & 1 deletion ckanext/recombinant/write_excel_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def _populate_reference_sheet_v2(sheet, chromo, refs):

def fill_cell(sheet, row, column, value, styles):
c = sheet.cell(row=row, column=column)
if isinstance(value, basestring):
if isinstance(value, str):
value = value.replace(u'\n', u'\r\n')
c.value = value
apply_styles(styles, c)
Expand Down

0 comments on commit b7292ec

Please sign in to comment.