mirror of
https://github.com/pim-n/pg-rad
synced 2026-03-23 21:58:12 +01:00
flake8 + fix bug in seed type checking
This commit is contained in:
@ -15,4 +15,4 @@ DEFAULT_MAX_TURN_ANGLE = 90.
|
|||||||
|
|
||||||
DEFAULT_FRICTION_COEFF = 0.7 # dry asphalt
|
DEFAULT_FRICTION_COEFF = 0.7 # dry asphalt
|
||||||
DEFAULT_GRAVITATIONAL_ACC = 9.81 # m/s^2
|
DEFAULT_GRAVITATIONAL_ACC = 9.81 # m/s^2
|
||||||
DEFAULT_ALPHA = 100.
|
DEFAULT_ALPHA = 100.
|
||||||
|
|||||||
@ -109,7 +109,10 @@ class ConfigParser:
|
|||||||
raise ValueError(
|
raise ValueError(
|
||||||
"options.air_density must be a positive float in kg/m^3."
|
"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.")
|
raise ValueError("Seed must be a positive integer value.")
|
||||||
|
|
||||||
return SimulationOptionsSpec(
|
return SimulationOptionsSpec(
|
||||||
|
|||||||
Reference in New Issue
Block a user