Skip to content

Commit

Permalink
fix doc string.
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeichikawasalesforce committed Nov 21, 2024
1 parent 4ed2768 commit d7d264f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tabpy/tabpy_tools/custom_query_object.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import inspect
import logging
import platform
from .query_object import QueryObject as _QueryObject
Expand Down Expand Up @@ -74,13 +73,12 @@ def query(self, *args, **kwargs):
def get_doc_string(self):
"""Get doc string from customized query"""
default_docstring = "-- no docstring found in query function --"
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
# else:
# return inspect.getdoc(self.custom_query) or default_docstring
if platform.system() == "Windows":
return default_docstring
else:
obj = self.custom_query
return obj.__doc__.strip() or default_docstring if isinstance(obj.__doc__, str) else default_docstring

def get_methods(self):
return [self.get_query_method()]
Expand Down

0 comments on commit d7d264f

Please sign in to comment.