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

Method funcIsValidStringInt

lefsebiom/ValidateData.py:213–230  ·  view source on GitHub ↗

Validates a parameter that is a string as a format which is an integer. :param parameterValue: Value to be evaluated. :type Unknown

(parameterValue)

Source from the content-addressed store, hash-verified

211
212 @staticmethod
213 def funcIsValidStringInt(parameterValue):
214 """
215 Validates a parameter that is a string as a format which is an integer.
216
217 :param parameterValue: Value to be evaluated.
218 :type Unknown
219 """
220
221 #Type string check
222 if not ValidateData.funcIsValidStringType(parameterValue):
223 return False
224
225 #Check to see if the string can be converted to an integer
226 try:
227 int(parameterValue)
228 except:
229 return False
230 return True
231
232 @staticmethod
233 def funcIsValidStringFloat(parameterValue):

Callers 1

funcGetWithoutOTUsMethod · 0.80

Calls 1

funcIsValidStringTypeMethod · 0.80

Tested by

no test coverage detected