Switch to sets for membership queries.
This commit is contained in:
parent
3dd3f9ab07
commit
4f61cfe30a
@ -184,7 +184,7 @@ class CatalogObject(BaseObject):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def music_version(self) -> int:
|
def music_version(self) -> int:
|
||||||
if self.game in [GameConstants.IIDX, GameConstants.MUSECA]:
|
if self.game in {GameConstants.IIDX, GameConstants.MUSECA}:
|
||||||
if self.omnimix:
|
if self.omnimix:
|
||||||
return self.version + DBConstants.OMNIMIX_VERSION_BUMP
|
return self.version + DBConstants.OMNIMIX_VERSION_BUMP
|
||||||
else:
|
else:
|
||||||
|
@ -222,7 +222,7 @@ class RecordsObject(BaseObject):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def music_version(self) -> int:
|
def music_version(self) -> int:
|
||||||
if self.game in [GameConstants.IIDX, GameConstants.MUSECA]:
|
if self.game in {GameConstants.IIDX, GameConstants.MUSECA}:
|
||||||
if self.omnimix:
|
if self.omnimix:
|
||||||
return self.version + DBConstants.OMNIMIX_VERSION_BUMP
|
return self.version + DBConstants.OMNIMIX_VERSION_BUMP
|
||||||
else:
|
else:
|
||||||
|
@ -25,7 +25,7 @@ class StatisticsObject(BaseObject):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def music_version(self) -> int:
|
def music_version(self) -> int:
|
||||||
if self.game in [GameConstants.IIDX, GameConstants.MUSECA]:
|
if self.game in {GameConstants.IIDX, GameConstants.MUSECA}:
|
||||||
if self.omnimix:
|
if self.omnimix:
|
||||||
return self.version + DBConstants.OMNIMIX_VERSION_BUMP
|
return self.version + DBConstants.OMNIMIX_VERSION_BUMP
|
||||||
else:
|
else:
|
||||||
@ -34,12 +34,12 @@ class StatisticsObject(BaseObject):
|
|||||||
return self.version
|
return self.version
|
||||||
|
|
||||||
def __is_play(self, attempt: Attempt) -> bool:
|
def __is_play(self, attempt: Attempt) -> bool:
|
||||||
if self.game in [
|
if self.game in {
|
||||||
GameConstants.DDR,
|
GameConstants.DDR,
|
||||||
GameConstants.JUBEAT,
|
GameConstants.JUBEAT,
|
||||||
GameConstants.MUSECA,
|
GameConstants.MUSECA,
|
||||||
GameConstants.POPN_MUSIC,
|
GameConstants.POPN_MUSIC,
|
||||||
]:
|
}:
|
||||||
return True
|
return True
|
||||||
if self.game == GameConstants.IIDX:
|
if self.game == GameConstants.IIDX:
|
||||||
return attempt.data.get_int('clear_status') != DBConstants.IIDX_CLEAR_STATUS_NO_PLAY
|
return attempt.data.get_int('clear_status') != DBConstants.IIDX_CLEAR_STATUS_NO_PLAY
|
||||||
|
Loading…
x
Reference in New Issue
Block a user