mirror of
https://github.com/ldericher/fftcgtool
synced 2025-01-15 15:02:59 +00:00
small bugfix
This commit is contained in:
parent
06d83af5c1
commit
63127a7d9a
1 changed files with 8 additions and 4 deletions
|
@ -32,16 +32,20 @@ class Code:
|
||||||
"?", "???", "?"
|
"?", "???", "?"
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return f"{self.__opus}-{self.__serial}"
|
return f"{self.__opus}-{self.__serial}{self.__rarity}"
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
return f"Code(\"{self.__opus}-{self.__serial}{self.__rarity}\")"
|
return f"Code(\"{str(self)}\")"
|
||||||
|
|
||||||
def __hash__(self) -> hash:
|
def __hash__(self) -> hash:
|
||||||
return hash(str(self))
|
return hash(self.short)
|
||||||
|
|
||||||
def __eq__(self, other: Code):
|
def __eq__(self, other: Code):
|
||||||
return str(self) == str(other)
|
return self.short == other.short
|
||||||
|
|
||||||
|
@property
|
||||||
|
def short(self) -> str:
|
||||||
|
return f"{self.__opus}-{self.__serial}"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def opus(self) -> str:
|
def opus(self) -> str:
|
||||||
|
|
Loading…
Reference in a new issue