GeneticAlgorithmPython icon indicating copy to clipboard operation
GeneticAlgorithmPython copied to clipboard

Resolving #283 user warning when delay_after_gen is not in use

Open greenLeopard opened this issue 1 year ago • 0 comments

I've made three small changes to remove the UserWarning without suppressing all warnings (#283 ).

  1. In the constructor, set the default value for delay_after_gen to None.
  2. In the validation step, if the incoming argument is None, set self.delay_after_gen to None.
  3. Before calling time.sleep(self.delay_after_gen) just check whether it's None.

Although, the alternative, since it's being deprecated, is to remove all references to delay_after_gen. I'll be happy to do that if it's your preference, then I'll resubmit the PR.

greenLeopard avatar Jul 17 '24 07:07 greenLeopard