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

Method funcIsValidList

lefsebiom/ValidateData.py:376–402  ·  view source on GitHub ↗

Validates a parameter as a list. :param parameterValue: Value to be evaluated. :type Unknown :return Boolean: True indicates the parameter is a list :type Boolean

(parameterValue)

Source from the content-addressed store, hash-verified

374 #Tested 9
375 @staticmethod
376 def funcIsValidList(parameterValue):
377 """
378 Validates a parameter as a list.
379
380 :param parameterValue: Value to be evaluated.
381 :type Unknown
382 :return Boolean: True indicates the parameter is a list
383 :type Boolean
384 """
385
386 #Check to make sure it is not null
387 if parameterValue == None:
388 return False
389
390 #Check to make sure it is a list
391 if not type(parameterValue) is ListType:
392 return False
393
394 #Check elements
395 listSize = len(parameterValue)
396 for i in range(0,listSize):
397 if parameterValue[i] == None:
398 return False
399 if type(parameterValue[i]) is ListType:
400 if ValidateData.funcIsValidList(parameterValue[i]) == False:
401 return False
402 return True
403
404 #Tested 9
405 @staticmethod

Callers 3

funcIsValidStringListMethod · 0.80
funcIsValidDictionaryMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected