Skip to content

Commit

Permalink
return utf-8
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeichikawasalesforce committed Nov 21, 2024
1 parent 6696388 commit cef04d7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tabpy/tabpy_tools/custom_query_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,13 @@ def query(self, *args, **kwargs):
def get_doc_string(self):
"""Get doc string from customized query"""
try:
return str(
self.custom_query.__doc__ or "-- no docstring found in query function --"
)
except:
if self.custom_query.__doc__ is not None:
return str(
bytes(self.custom_query.__doc__, "utf-8").decode("unicode_escape")
)
else:
return "-- no docstring found in query function --"
except Exception as e:
return "-- no docstring found in query function --"

def get_methods(self):
Expand Down

0 comments on commit cef04d7

Please sign in to comment.