From 0b2ed8e17c7261f87fb96ed823a2c75449c3e5d1 Mon Sep 17 00:00:00 2001 From: Jake Ichikawa Date: Thu, 21 Nov 2024 11:08:55 -0800 Subject: [PATCH] use sys instead of platform. --- tabpy/tabpy_tools/custom_query_object.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tabpy/tabpy_tools/custom_query_object.py b/tabpy/tabpy_tools/custom_query_object.py index 497471d2..db4f3aa8 100644 --- a/tabpy/tabpy_tools/custom_query_object.py +++ b/tabpy/tabpy_tools/custom_query_object.py @@ -1,5 +1,5 @@ import logging -import platform +import sys from .query_object import QueryObject as _QueryObject @@ -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()]