Skip to content

Commit 4ed2768

Browse files
test get_doc_string.
1 parent a0ca62b commit 4ed2768

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tabpy/tabpy_tools/custom_query_object.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import inspect
22
import logging
33
import platform
4-
import sys
54
from .query_object import QueryObject as _QueryObject
65

76

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

0 commit comments

Comments
 (0)