Passed
Push — master ( dbd4af...e9c47c )
by Jan
02:33 queued 11s
created

template   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 9
rs 10
c 0
b 0
f 0
wmc 3

1 Function

Rating   Name   Duplication   Size   Complexity  
A preprocess() 0 8 3
1
def preprocess(data, lang):
2
    sebool_bool = data.get("sebool_bool", None)
3
    if sebool_bool is not None and sebool_bool not in ["true", "false"]:
4
        raise ValueError(
5
            "ERROR: key sebool_bool in rule {0} contains forbidden "
6
            "value '{1}'.".format(data["_rule_id"], sebool_bool)
7
        )
8
    return data
9