Skip to content

Commit

Permalink
Cast string var as str.
Browse files Browse the repository at this point in the history
  • Loading branch information
hrshdhgd committed Apr 9, 2024
1 parent cc2f27b commit 1a1d057
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pyobo/struct/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

def obo_escape(string: str) -> str:
"""Escape all funny characters for OBO."""
return "".join(OBO_ESCAPE.get(character, character) for character in string)
return "".join(OBO_ESCAPE.get(character, character) for character in str(string))


def obo_escape_slim(string: str) -> str:
"""Escape all funny characters for OBO."""
rv = "".join(OBO_ESCAPE_SLIM.get(character, character) for character in string)
rv = "".join(OBO_ESCAPE_SLIM.get(character, character) for character in str(string))
rv = rv.replace("\n", "\\n")
return rv

Expand Down

0 comments on commit 1a1d057

Please sign in to comment.