snakelet.storage.annotation   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 17
dl 0
loc 28
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A Cat.meow() 0 3 1
A Cat.__init__() 0 4 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A foo() 0 5 1
1
from .document import Document
2
3
4
def foo(func):
5
    def inner(*args, **kwargs):
6
        return func(*args, **kwargs)
7
8
    return inner
9
10
11
class Cat(Document):
12
    def __init__(self, name: str, **kwargs):
13
        # Parental
14
        super().__init__(**kwargs)
15
        self.name = name
16
17
    @foo
18
    def meow(self):
19
        return self.name
20
21
22
litter = [
23
    Cat('kitty'),
24
    Cat('cutey')
25
]
26
27
print('meow:', [cat.meow() for cat in litter])
28