From 897c4efa9dceead3f4da7f87a3c216e36ff465dc Mon Sep 17 00:00:00 2001 From: Lukas Rothenberger Date: Mon, 8 Jan 2024 15:57:23 +0100 Subject: [PATCH] fix(optimizer) [evolutionary]: mypy type fix --- .../discopop_optimizer/optimization/evolutionary_algorithm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/discopop_library/discopop_optimizer/optimization/evolutionary_algorithm.py b/discopop_library/discopop_optimizer/optimization/evolutionary_algorithm.py index da0c16599..d70f60735 100644 --- a/discopop_library/discopop_optimizer/optimization/evolutionary_algorithm.py +++ b/discopop_library/discopop_optimizer/optimization/evolutionary_algorithm.py @@ -42,6 +42,8 @@ def perform_evolutionary_search( arguments: OptimizerArguments, optimizer_dir: str, ) -> Optional[OptimizerOutputPattern]: + if arguments.evolutionary is None: + raise ValueError("Invalid arguments for evolutionary search: " + str(arguments.evolutionary)) ### SETTINGS population_size = int(arguments.evolutionary[0]) generations = int(arguments.evolutionary[1])