Skip to content

Commit

Permalink
Convert docstring from bytes to str
Browse files Browse the repository at this point in the history
  • Loading branch information
gdesmar committed Oct 8, 2024
1 parent f603a44 commit 4cd10b7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions uncompyle6/semantics/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ def is_lambda_mode(compile_mode: str) -> bool:


def print_docstring(self, indent, docstring):
if isinstance(docstring, bytes):
docstring = docstring.decode("utf8", errors="backslashreplace")

quote = '"""'
if docstring.find(quote) >= 0:
if docstring.find("'''") == -1:
Expand Down

0 comments on commit 4cd10b7

Please sign in to comment.