Use only Python

This commit is contained in:
Lucàs
2023-12-26 22:09:40 +01:00
parent 31f70d319f
commit efbf7fb7cc
33 changed files with 625 additions and 391 deletions
+12
View File
@@ -0,0 +1,12 @@
from src.model.social import Social
class SocialList:
def __init__(self, socials: list):
self.socials = [Social(social.get("name"), social.get("url"), social.get("img")) for social in socials]
def __str__(self) -> str:
return "\n".join([str(social) for social in self.socials])
def __repr__(self) -> str:
return "\n".join([str(social) for social in self.socials])