Passed
Push — develop ( 3c2cc7...ae040d )
by Dean
02:38
created

bind()   A

Complexity

Conditions 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2
Metric Value
cc 2
dl 0
loc 10
ccs 5
cts 5
cp 1
crap 2
rs 9.4285

1 Method

Rating   Name   Duplication   Size   Complexity  
A outer() 0 7 1
1 1
import logging
2
3 1
log = logging.getLogger(__name__)
4
5
6 1
def bind(action, modes=None):
7 1
    def outer(func):
8 1
        func.binding = {
9
            'action': action,
10
            'modes': modes
11
        }
12
13 1
        return func
14
15
    return outer
16