Convert docstring from bytes to str

This commit is contained in:
gdesmar
2024-10-08 13:48:39 +00:00
parent f603a44cf7
commit 4cd10b79e2

View File

@@ -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: