Skip to content

Commit d7d264f

Browse files
fix doc string.
1 parent 4ed2768 commit d7d264f

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

tabpy/tabpy_tools/custom_query_object.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import inspect
21
import logging
32
import platform
43
from .query_object import QueryObject as _QueryObject
@@ -74,13 +73,12 @@ def query(self, *args, **kwargs):
7473
def get_doc_string(self):
7574
"""Get doc string from customized query"""
7675
default_docstring = "-- no docstring found in query function --"
77-
obj = self.custom_query
78-
return obj.__doc__.strip() or default_docstring if isinstance(obj.__doc__, str) else default_docstring
7976
# Docstring parsing not working on Windows.
80-
# if platform.system() == "Windows":
81-
# return default_docstring
82-
# else:
83-
# return inspect.getdoc(self.custom_query) or default_docstring
77+
if platform.system() == "Windows":
78+
return default_docstring
79+
else:
80+
obj = self.custom_query
81+
return obj.__doc__.strip() or default_docstring if isinstance(obj.__doc__, str) else default_docstring
8482

8583
def get_methods(self):
8684
return [self.get_query_method()]

0 commit comments

Comments
 (0)