Skip to content

Commit

Permalink
use sys instead of platform.
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeichikawasalesforce committed Nov 21, 2024
1 parent 5231e4f commit 0b2ed8e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tabpy/tabpy_tools/custom_query_object.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
import platform
import sys
from .query_object import QueryObject as _QueryObject


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

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

docstring = getattr(self.custom_query, '__doc__', None)
return docstring.strip() if isinstance(docstring, str) and docstring else 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()]
Expand Down

0 comments on commit 0b2ed8e

Please sign in to comment.