diff --git a/tabpy/tabpy_tools/custom_query_object.py b/tabpy/tabpy_tools/custom_query_object.py index 7651d6bd..280e0c19 100644 --- a/tabpy/tabpy_tools/custom_query_object.py +++ b/tabpy/tabpy_tools/custom_query_object.py @@ -75,10 +75,13 @@ def query(self, *args, **kwargs): def get_doc_string(self): """Get doc string from customized query""" default_docstring = "-- no docstring found in query function --" - if platform.system() == "Windows" and sys.maxsize <= 2**32: + + # TODO: fix docstring parsing on Windows systems + if sys.platform == 'win32': return default_docstring - else: - return inspect.getdoc(self.custom_query) or default_docstring + + ds = getattr(self.custom_query, '__doc__', None) + return ds if ds and isinstance(ds, str) else default_docstring def get_methods(self): return [self.get_query_method()]