flake8 + fix bug in seed type checking

This commit is contained in:
Pim Nelissen
2026-03-02 08:51:02 +01:00
parent dba1240e9f
commit 176baa543a
2 changed files with 5 additions and 2 deletions

View File

@ -109,7 +109,10 @@ class ConfigParser:
raise ValueError(
"options.air_density must be a positive float in kg/m^3."
)
if not isinstance(seed, int) or seed < 0:
if (
seed is not None or
(isinstance(seed, int) and seed <= 0)
):
raise ValueError("Seed must be a positive integer value.")
return SimulationOptionsSpec(