Skip to content

Commit

Permalink
test get_doc_string.
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeichikawasalesforce committed Nov 21, 2024
1 parent a0ca62b commit 4ed2768
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tabpy/tabpy_tools/custom_query_object.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import inspect
import logging
import platform
import sys
from .query_object import QueryObject as _QueryObject


Expand Down Expand Up @@ -75,7 +74,8 @@ def query(self, *args, **kwargs):
def get_doc_string(self):
"""Get doc string from customized query"""
default_docstring = "-- no docstring found in query function --"
return default_docstring
obj = self.custom_query
return obj.__doc__.strip() or default_docstring if isinstance(obj.__doc__, str) else default_docstring
# Docstring parsing not working on Windows.
# if platform.system() == "Windows":
# return default_docstring
Expand Down

0 comments on commit 4ed2768

Please sign in to comment.