1 | from __future__ import ( |
||
0 ignored issues
–
show
|
|||
2 | absolute_import, |
||
3 | division, |
||
4 | print_function |
||
5 | ) |
||
6 | |||
7 | import enum |
||
8 | |||
9 | |||
10 | class StateStatus(enum.Enum): |
||
11 | """Enumeration of the possible :class:`State` statuses.""" |
||
12 | #: Pristin empty status. |
||
13 | init = 0 |
||
14 | #: Input has been set and Steps are running or ready. |
||
15 | running = 1 |
||
16 | #: All Steps are in the completed status or one was aborted. |
||
17 | completed = 2 |
||
18 | #: All steps completed as successful. |
||
19 | succeeded = completed | 4 |
||
20 | #: Step completed in failure. |
||
21 | failed = completed | 8 |
||
22 | |||
23 | def means(self, status): |
||
0 ignored issues
–
show
This method should have a docstring.
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods: class SomeClass:
def some_method(self):
"""Do x and return foo."""
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions. ![]() |
|||
24 | # E1101: Instance of 'StateStatus' has no 'value' member |
||
25 | # pylint: disable=E1101 |
||
26 | return (self.value & status.value) == status.value |
||
27 | |||
28 | |||
29 | class StepStateStatus(enum.Enum): |
||
30 | """Enumeration of the possible :class:`StepState` statuses.""" |
||
31 | |||
32 | #: Step is not started yet (may be waiting on dependencies). |
||
33 | pending = 0 |
||
34 | #: Step is ready to be started |
||
35 | ready = 1 |
||
36 | #: Step is running |
||
37 | running = 2 |
||
38 | #: Step was either completed (sucess OR failure) or skipped. |
||
39 | completed = 4 |
||
40 | #: Step resulted in a permanent error. |
||
41 | aborted = 8 |
||
42 | #: Step completed as successful. |
||
43 | succeeded = completed | 16 |
||
44 | #: Step completed in failure. |
||
45 | failed = completed | 32 |
||
46 | #: Step was skipped (will not be run). |
||
47 | skipped = completed | 64 |
||
48 | |||
49 | def means(self, status): |
||
0 ignored issues
–
show
This method should have a docstring.
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods: class SomeClass:
def some_method(self):
"""Do x and return foo."""
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions. ![]() |
|||
50 | # E1101: Instance of 'StepStateStatus' has no 'value' member |
||
51 | # pylint: disable=E1101 |
||
52 | return (self.value & status.value) == status.value |
||
53 |
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.