Config   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 9
ccs 8
cts 8
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A parse_config() 0 5 1
1
"""Configuration module."""
2
3 1
import os
4 1
import json
5 1
import logging
6 1
from ppp_libmodule.config import Config as BaseConfig
7 1
from ppp_libmodule.exceptions import InvalidConfig
8
9
10 1
class Config(BaseConfig):
11 1
    __slots__ = ('corenlp_servers',
12
            'memcached_servers', 'memcached_timeout', 'memcached_salt')
13 1
    config_path_variable = 'PPP_QUESTIONPARSING_GRAMMATICAL_CONFIG'
14 1
    def parse_config(self, data):
15 1
        self.corenlp_servers = data['corenlp_servers']
16 1
        self.memcached_servers = data['memcached']['servers']
17 1
        self.memcached_timeout = data['memcached']['timeout']
18
        self.memcached_salt = data['memcached']['salt']
19