Completed
Pull Request — master (#43)
by Wojtek
07:28
created

OptimizationStatus   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
dl 0
loc 16
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __eq__() 0 4 2
1
"""Describe status of optimization."""
2 1
from enum import Enum
3
4
5 1
class OptimizationStatus(Enum):
6
    """Enum for describing status of optimization.
7 1
    not_started - nothing was optimized yet
8 1
    in_progress - optimization is in progress
9 1
    success - optimization successfully completed
10 1
    failed - optimization couldn't be done
11
    """
12
    not_started = "Not started"
13
    success = "Success"
14
    in_progress = "In progress"
15
    failed = "Failed"
16
17
    def __eq__(self, other):
18
        if other is None:
19
            return False
20
        return self.value == other.value
21