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
Copy file name to clipboardExpand all lines: pygad/utils/validation.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -936,7 +936,7 @@ def _validate_callbacks(self,
936
936
self.on_start=on_start
937
937
else:
938
938
self.valid_parameters=False
939
-
raiseValueError(f"The method assigned to the on_start parameter must accept only 2 parameters:\n1) The instance of the genetic algorithm.\nThe passed method named '{on_start.__code__.co_name}' accepts {len(inspect.signature(on_start).parameters)} parameter(s).")
939
+
raiseValueError(f"The method assigned to the on_start parameter must accept only 1 parameter representing the instance of the genetic algorithm. The passed method named '{on_start.__code__.co_name}' accepts {len(inspect.signature(on_start).parameters)} parameter(s).")
940
940
# Check if the on_start is a function.
941
941
elifinspect.isfunction(on_start):
942
942
# Check if the on_start function accepts only a single parameter.
0 commit comments