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

@ -15,4 +15,4 @@ DEFAULT_MAX_TURN_ANGLE = 90.
DEFAULT_FRICTION_COEFF = 0.7 # dry asphalt
DEFAULT_GRAVITATIONAL_ACC = 9.81 # m/s^2
DEFAULT_ALPHA = 100.
DEFAULT_ALPHA = 100.

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(