Skip to content

Commit 0b2ed8e

Browse files
use sys instead of platform.
1 parent 5231e4f commit 0b2ed8e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tabpy/tabpy_tools/custom_query_object.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import logging
2-
import platform
2+
import sys
33
from .query_object import QueryObject as _QueryObject
44

55

@@ -75,11 +75,11 @@ def get_doc_string(self):
7575
default_docstring = "-- no docstring found in query function --"
7676

7777
# Skip docstring parsing on Windows 32-bit systems
78-
if platform.system() == "Windows" and platform.architecture()[0] == "32bit":
78+
if sys.platform == 'win32':
7979
return default_docstring
8080

81-
docstring = getattr(self.custom_query, '__doc__', None)
82-
return docstring.strip() if isinstance(docstring, str) and docstring else default_docstring
81+
ds = getattr(self.custom_query, '__doc__', None)
82+
return ds if ds and isinstance(ds, str) else default_docstring
8383

8484
def get_methods(self):
8585
return [self.get_query_method()]

0 commit comments

Comments
 (0)