mirror of
https://github.com/ldericher/fftcgtool
synced 2025-01-15 15:02:59 +00:00
__repr__ implementations
This commit is contained in:
parent
938a10c807
commit
cbc57e7611
2 changed files with 4 additions and 1 deletions
|
@ -73,6 +73,9 @@ class Card:
|
|||
text=text,
|
||||
)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"Card(code={self.code!r}, name={self.name!r}, face_url={self.face_url!r})"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"'{self.__name}' ({'/'.join(self.__elements)}, {self.code})"
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ class Code:
|
|||
return f"{self.__opus}-{self.__serial}{self.__rarity}"
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"Code(\"{str(self)}\")"
|
||||
return f"Code({str(self)!r})"
|
||||
|
||||
def __hash__(self) -> hash:
|
||||
return hash(self.short)
|
||||
|
|
Loading…
Reference in a new issue