Completed
Push — master ( c5f393...12467b )
by Ryan
01:17
created

Config   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 19
rs 10
wmc 6

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __init__() 0 2 1
A __getattr__() 0 5 2
A __setattr__() 0 2 1
A __delattr__() 0 2 1
A __repr__() 0 2 1
1
2
class Config(dict):
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable dict does not seem to be defined.
Loading history...
3
4
    def __init__(self):
5
        dict.__init__(self)
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable self does not seem to be defined.
Loading history...
6
7
    def __getattr__(self, key):
8
        try:
9
            return self[key]
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable self does not seem to be defined.
Loading history...
Comprehensibility Best Practice introduced by
The variable key does not seem to be defined.
Loading history...
10
        except KeyError:
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable KeyError does not seem to be defined.
Loading history...
11
            raise AttributeError
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable AttributeError does not seem to be defined.
Loading history...
12
13
    def __setattr__(self, key, value):
14
        self[key] = value
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable value does not seem to be defined.
Loading history...
15
16
    def __delattr__(self, key):
17
        del self[key]
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable key does not seem to be defined.
Loading history...
Comprehensibility Best Practice introduced by
The variable self does not seem to be defined.
Loading history...
18
19
    def __repr__(self):
20
        return '<Config ' + dict.__repr__(self) + '>'
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable self does not seem to be defined.
Loading history...
21