From 343a604f332c2d925d6045265679ac95fade5f34 Mon Sep 17 00:00:00 2001 From: Ivan Kharitonov Date: Sun, 29 Oct 2023 13:42:15 +0300 Subject: [PATCH] simplify --- src/configs/object_config.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/configs/object_config.py b/src/configs/object_config.py index b8d80277..36f735f7 100644 --- a/src/configs/object_config.py +++ b/src/configs/object_config.py @@ -29,10 +29,8 @@ def __init__(self, initial: Gaussian, t_birth: int, t_death: int, *args, **kwarg """ assert isinstance(initial, Gaussian), "Argument of wrong type!" assert isinstance(t_birth, int), "Argument of wrong type!" - assert t_birth >= 0, "object birth should be positive!" assert isinstance(t_death, int), "Argument of wrong type!" - assert t_death >= 0, "object death should be positive!" - assert t_death >= t_birth, "object death should be greater or equal than birth!" + assert 0 <= t_birth <= t_death self.id = next(Object.new_id) self.initial_state = initial