16 lines
539 B
Python
16 lines
539 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from typing import Self, Any
|
|
from Utils.Utils import Utils
|
|
|
|
class SetModel:
|
|
|
|
def __init__(self:Self, data:dict[str, Any|None], i:int) -> None:
|
|
self.origin:str = data.get("origin", "")
|
|
self.title:str = data.get("title", "")
|
|
self.group:None = data.get("group") or Utils.to_snake(self.title)
|
|
self.i:int = i
|
|
self.group_i:int
|
|
self.sources:list[str] = data.get("sources", [])
|
|
self.variables:dict[str, Any] = data.get("own_variables", {}) |