Skip to content

Commit dc668a2

Browse files
Fix for win32.
1 parent be38d88 commit dc668a2

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tabpy/tabpy_tools/custom_query_object.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,10 @@ def query(self, *args, **kwargs):
7171

7272
def get_doc_string(self):
7373
"""Get doc string from customized query"""
74-
if self.custom_query.__doc__:
75-
encoding = "utf-8" if sys.platform != "win32" else "cp1252"
76-
return str(
77-
bytes(self.custom_query.__doc__, encoding).decode("unicode_escape")
78-
)
79-
return "-- no docstring found in query function --"
74+
if self.custom_query.__doc__ is not None and sys.platform != "win32":
75+
return self.custom_query.__doc__
76+
else:
77+
return "-- no docstring found in query function --"
8078

8179
def get_methods(self):
8280
return [self.get_query_method()]

0 commit comments

Comments
 (0)