kuon.watcher.adapters.models.sticker   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 13
dl 0
loc 30
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A Sticker.value() 0 10 1
A Sticker.__init__() 0 10 1
1
#!/usr/bin/python
2
# -*- coding: utf-8 -*-
3 1
from kuon.watcher.adapters.models import AbstractEntity
4
5
6 1
class Sticker(AbstractEntity):
7
    """General Sticker Class"""
8
9 1
    def __init__(self, name: str, image: str, wear_value: float) -> None:
10
        """Initializing function
11
12
        :type name: str
13
        :type image: str
14
        :type wear_value: float
15
        """
16 1
        self._name = name
17 1
        self._image = image
18 1
        self._wear_value = wear_value
19
20 1
    @property
21 1
    def value(self) -> dict:
22
        """Return all important information regarding the Stickers
23
24
        :return:
25
        """
26 1
        return {
27
            'name': self._name,
28
            'image': self._image,
29
            'wear_value': self._wear_value
30
        }
31