~mapperr/trl

trl/trullo/trl_list.py -rw-r--r-- 354 bytes
edfaf2b5 — mapperr Add line break to the readme 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from typing import Dict

import attr

from trullo.shortcuttable import Shortcuttable
from trullo.normalizer import Normalizer


@attr.s(auto_attribs=True)
class TrlList(Shortcuttable):
    id: str
    raw_data: Dict

    def get_normalized_name(self) -> str:
        return Normalizer.normalize(
            f"{self.raw_data['name']}{self.id}"
        )