MCPcopy Create free account
hub / github.com/SegataLab/lefse / funcIsValidString

Method funcIsValidString

lefsebiom/ValidateData.py:193–210  ·  view source on GitHub ↗

Validates a parameter as a string. Does NOT allow string to be blank or empty. :param parameterValue: Value to be evaluated. :type Unknown :return Boolean: True indicates the parameter is a string. :type Boolean

(parameterValue)

Source from the content-addressed store, hash-verified

191 #Tested 5
192 @staticmethod
193 def funcIsValidString(parameterValue):
194 """
195 Validates a parameter as a string. Does NOT allow string to be blank or empty.
196
197 :param parameterValue: Value to be evaluated.
198 :type Unknown
199 :return Boolean: True indicates the parameter is a string.
200 :type Boolean
201 """
202
203 #Type check
204 if not ValidateData.funcIsValidStringType(parameterValue):
205 return False
206
207 #Check to see it is not blank
208 if parameterValue.strip() == "":
209 return False
210 return True
211
212 @staticmethod
213 def funcIsValidStringInt(parameterValue):

Calls 1

funcIsValidStringTypeMethod · 0.80

Tested by

no test coverage detected