You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I realized that there is an issue in 'validate(self, value)' of code/Attack/ParameterTypes/Percentage.py. I have corrected the issue and commented the line with the error.
fromAttack.ParameterTypes.BaseTypeimportParameterTypeclassPercentage(ParameterType):
def__init__(self):
super(Percentage, self).__init__()
self.name="Percentage"defvalidate(self, value) -> (bool, int):
#return Percentage._is_float(value)[0] and 0 <= value <= 1, valueres=Percentage._is_float(value)
returnres[0] and0<=res[1] <=1, res[1]
@staticmethoddef_is_float(value):
""" Checks whether the given value is a float. :param value: The value to be checked. :return: True if the value is a float, otherwise False. And the casted float. """try:
value=float(value)
returnTrue, valueexceptValueError:
returnFalse, value
The text was updated successfully, but these errors were encountered:
Hi, I realized that there is an issue in 'validate(self, value)' of code/Attack/ParameterTypes/Percentage.py. I have corrected the issue and commented the line with the error.
The text was updated successfully, but these errors were encountered: