Object-oriented programming
All launcher functions are now return an object instead of a dict
This commit is contained in:
9
worthless/classes/launcher/iconotherlink.py
Normal file
9
worthless/classes/launcher/iconotherlink.py
Normal file
@ -0,0 +1,9 @@
|
||||
class IconOtherLink:
|
||||
def __init__(self, title, url):
|
||||
self.title = title
|
||||
self.url = url
|
||||
|
||||
@staticmethod
|
||||
def from_dict(data) -> 'IconOtherLink':
|
||||
"""Creates a launcher icon other link from a dictionary."""
|
||||
return IconOtherLink(data["title"], data["url"])
|
||||
Reference in New Issue
Block a user