Esempio n. 1
0
 def _check_input(self, rooms_number: int, dimensions: float, min_age: int,
                  has_batteries: bool, name: str, description: str,
                  product_id: str) -> None:
     """
     Checks input.
     """
     CheckInput.check_all_input_type([rooms_number, min_age], int)
     CheckInput.check_type(dimensions, int, float)
     CheckInput.check_type(has_batteries, bool)
     CheckInput.check_all_input_value_is_lower_equal_than_threshold(
         [rooms_number, dimensions, min_age], 0)
     CheckInput.check_all_input_type([description, product_id, name], str)
Esempio n. 2
0
 def _check_input(self, speed: float, jump_height: float,
                  is_grow_in_dark: bool, spider_type: SpiderType,
                  min_age: int, has_batteries: bool, name: str,
                  description: str, product_id: str) -> None:
     """
     Checks input.
     """
     CheckInput.check_all_input_type([speed, jump_height, min_age], int,
                                     float)
     CheckInput.check_type(spider_type, SpiderType)
     CheckInput.check_all_input_type([is_grow_in_dark, has_batteries], bool)
     CheckInput.check_all_input_type([name, description, product_id], str)
     CheckInput.check_all_input_value_is_lower_equal_than_threshold(
         [speed, jump_height, min_age], 0)