| Total Complexity | 7 | 
| Total Lines | 40 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | #!/usr/bin/python  | 
            ||
| 
                                                                                                    
                        
                         | 
                |||
| 2 | # -*- coding: utf-8 -*-  | 
            ||
| 3 | from typing import Callable  | 
            ||
| 4 | |||
| 5 | |||
| 6 | class Constraint:  | 
            ||
| 7 | |||
| 8 | def __init__(self, value, cmp_func: Callable):  | 
            ||
| 9 | """Initializing function  | 
            ||
| 10 | |||
| 11 | :param value:  | 
            ||
| 12 | :type cmp_func: Callable  | 
            ||
| 13 | """  | 
            ||
| 14 | self.value = value  | 
            ||
| 15 | self.cmp_func = cmp_func  | 
            ||
| 16 | |||
| 17 | @staticmethod  | 
            ||
| 18 | def cmp_value_bigger(x, y):  | 
            ||
| 19 | return x > y  | 
            ||
| 20 | |||
| 21 | @staticmethod  | 
            ||
| 22 | def cmp_value_bigger_or_equal(x, y):  | 
            ||
| 23 | return x >= y  | 
            ||
| 24 | |||
| 25 | @staticmethod  | 
            ||
| 26 | def cmp_value_smaller(x, y):  | 
            ||
| 27 | return x < y  | 
            ||
| 28 | |||
| 29 | @staticmethod  | 
            ||
| 30 | def cmp_value_smaller_or_equal(x, y):  | 
            ||
| 31 | return x <= y  | 
            ||
| 32 | |||
| 33 | @staticmethod  | 
            ||
| 34 | def cmp_value_equals(x, y):  | 
            ||
| 35 | return x == y  | 
            ||
| 36 | |||
| 37 | @staticmethod  | 
            ||
| 38 | def cmp_value_not_equals(x, y):  | 
            ||
| 39 | return x != y  | 
            ||
| 40 | 
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.