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

Config.__setattr__()   A

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 2
rs 10
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