mavenversioncmp.py
def _isContainedInBounds (version, lowerBound, upperBound):
  """ Checks if given version is contained in given bounds
  """
  # if lowerBound = '(' or '[' it passes the lower test since anything
  # is > or >= than minus infinite
  if (lowerBound != '(') and (lowerBound != '['):
    result = compare(version, lowerBound)

    # version should be > lower to continue
    if (lowerBound[0] == '(') and (result <= 0):
      return False

    # version should be >= lower to continue
    elif (lowerBound[0] == '[') and (result < 0):
      return False

  # if upperBound = ')' or ']' it passes the upper test since anything
  # is < or <= than infinite
  if (upperBound != ')') and (upperBound != ']'):
    result = compare(version, upperBound)

    # version should be less than my upper to continue
    if (upperBound[-1] == ')') and (result >= 0):
      return False

    # version should be less than or equal to upper value 
    # to continue, otherwise if it is greater we are done
    elif (upperBound[-1] == ']') and (result > 0):
      return False

  return True
 Checks if given version is contained in given bounds
  
Checks if given version is contained in given bounds
Checks if given version is contained in given bounds
def _isContainedInBounds (version, lowerBound, upperBound):
  if (lowerBound != '(') and (lowerBound != '['):
    result = compare(version, lowerBound)
    if (lowerBound[0] == '(') and (result <= 0):
      return False
    elif (lowerBound[0] == '[') and (result < 0):
      return False
  if (upperBound != ')') and (upperBound != ']'):
    result = compare(version, upperBound)
    if (upperBound[-1] == ')') and (result >= 0):
      return False
    elif (upperBound[-1] == ']') and (result > 0):
      return False
  return True
def _isContainedInBounds ( version , lowerBound , upperBound ) : if ( lowerBound != '(' ) and ( lowerBound != '[' ) : result = compare ( version , lowerBound ) if ( lowerBound [ 0 ] == '(' ) and ( result <= 0 ) : return False elif ( lowerBound [ 0 ] == '[' ) and ( result < 0 ) : return False if ( upperBound != ')' ) and ( upperBound != ']' ) : result = compare ( version , upperBound ) if ( upperBound [ - 1 ] == ')' ) and ( result >= 0 ) : return False elif ( upperBound [ - 1 ] == ']' ) and ( result > 0 ) : return False return True
Checks if given version is contained in given bounds
Checks if given version is contained in given bounds
""" Checks if given version is contained in given bounds
  """ # if lowerBound = '(' or '[' it passes the lower test since anything # is > or >= than minus infinite # version should be > lower to continue # version should be >= lower to continue # if upperBound = ')' or ']' it passes the upper test since anything # is < or <= than infinite # version should be less than my upper to continue # version should be less than or equal to upper value  # to continue, otherwise if it is greater we are done
version
lowerBound
upperBound