示例#1
0
 def _check_conditions(self, node: ast.BoolOp) -> None:
     conditions_count = self._count_conditions(node)
     if conditions_count > constants.MAX_CONDITIONS:
         self.add_violation(
             complexity.TooManyConditionsViolation(
                 node,
                 text=str(conditions_count),
                 baseline=constants.MAX_CONDITIONS,
             ), )
示例#2
0
 def _check_conditions(self, node: ast.BoolOp) -> None:
     conditions_count = self._count_conditions(node)
     if conditions_count > self._max_conditions:
         self.add_violation(
             complexity.TooManyConditionsViolation(
                 node,
                 text=str(conditions_count),
                 baseline=self._max_conditions,
             ),
         )