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

Method funcIsValidStringFloat

lefsebiom/ValidateData.py:233–250  ·  view source on GitHub ↗

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

(parameterValue)

Source from the content-addressed store, hash-verified

231
232 @staticmethod
233 def funcIsValidStringFloat(parameterValue):
234 """
235 Validates a parameter that is a string as a format which is a numeric.
236
237 :param parameterValue: Value to be evaluated.
238 :type Unknown
239 """
240
241 #Type string check
242 if not ValidateData.funcIsValidStringType(parameterValue):
243 return False
244
245 #Check to see if the string can be converted to a double
246 try:
247 float(parameterValue)
248 except:
249 return False
250 return True
251
252 #Tested 6
253 @staticmethod

Callers

nothing calls this directly

Calls 1

funcIsValidStringTypeMethod · 0.80

Tested by

no test coverage detected