Completed
Push — master ( 32acac...19ae40 )
by Lakshmi
11:34
created

BaseAction   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 9
Bugs 0 Features 1
Metric Value
c 9
b 0
f 1
dl 0
loc 11
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A _get_client() 0 6 1
A __init__() 0 3 1
1
from hue import Hue
2
from st2actions.runners.pythonrunner import Action
3
4
5
class BaseAction(Action):
6
    def __init__(self, config):
7
        super(BaseAction, self).__init__(config)
8
        self.hue = self._get_client()
9
10
    def _get_client(self):
11
        hue = Hue()
12
        hue.station_ip = self.config['station_ip']
13
        hue.get_state()
14
15
        return hue
16