Completed
Push — master ( be542d...29973a )
by Arma
08:49 queued 01:31
created

_determine_execution_status()   C

Complexity

Conditions 10

Size

Total Lines 20

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 20
rs 6
cc 10

How to fix   Complexity   

Complexity

Complex classes like st2actions.cmd.MistralResultsQuerier._determine_execution_status() often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

1