Conditions | 2 |
Total Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 2.2559 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | """Inspector. |
||
20 | 6 | def get_as_attribute(self, key): |
|
21 | """Return attribute with the given name, or raise AttributeError.""" |
||
22 | 6 | try: |
|
23 | 6 | return self.dict[key] |
|
24 | # These lines will execute if an incomplete data descriptor is used for |
||
25 | # the operation it doesn't define. |
||
26 | except KeyError: |
||
27 | raise AttributeError(key) |
||
28 |