language moved to dataclass
This commit is contained in:
37
SprintLib/language.py
Normal file
37
SprintLib/language.py
Normal file
@@ -0,0 +1,37 @@
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
@dataclass
|
||||
class Language:
|
||||
id: int
|
||||
name: str
|
||||
work_name: str
|
||||
file_type: str
|
||||
logo_url: str
|
||||
image: str
|
||||
highlight: str
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
|
||||
languages = [
|
||||
Language(
|
||||
id=0,
|
||||
name="Python3",
|
||||
work_name="Python3",
|
||||
file_type="py",
|
||||
logo_url="https://entredatos.es/wp-content/uploads/2021/05/1200px-Python-logo-notext.svg.png",
|
||||
image="python:3.6",
|
||||
highlight="python",
|
||||
),
|
||||
Language(
|
||||
id=1,
|
||||
name="Kotlin",
|
||||
work_name="Kotlin",
|
||||
file_type="kt",
|
||||
logo_url="https://upload.wikimedia.org/wikipedia/commons/0/06/Kotlin_Icon.svg",
|
||||
image="zenika/kotlin",
|
||||
highlight="kotlin",
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user