MakeBeansProfitAction   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 7
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 3 1
1
from synergine.synergy.event.Action import Action
2
from tests.src.event.MakeBeansProfitEvent import MakeBeansProfitEvent
3
from tests.src.cst import BEANS
4
5
class MakeBeansProfitAction(Action):
6
7
    _listen = MakeBeansProfitEvent
8
9
    def run(self, obj, context, synergy_manager):
10
        obj.beans = obj.beans ** obj.coeff
11
        context.metas.value.set(BEANS, obj.get_id(), obj.beans)
12
13