1
0
mirror of synced 2024-11-27 23:50:47 +01:00

Switch to sets for membership queries.

This commit is contained in:
Jennifer Taylor 2021-08-19 19:21:04 +00:00
parent 3dd3f9ab07
commit 4f61cfe30a
3 changed files with 5 additions and 5 deletions

View File

@ -184,7 +184,7 @@ class CatalogObject(BaseObject):
@property
def music_version(self) -> int:
if self.game in [GameConstants.IIDX, GameConstants.MUSECA]:
if self.game in {GameConstants.IIDX, GameConstants.MUSECA}:
if self.omnimix:
return self.version + DBConstants.OMNIMIX_VERSION_BUMP
else:

View File

@ -222,7 +222,7 @@ class RecordsObject(BaseObject):
@property
def music_version(self) -> int:
if self.game in [GameConstants.IIDX, GameConstants.MUSECA]:
if self.game in {GameConstants.IIDX, GameConstants.MUSECA}:
if self.omnimix:
return self.version + DBConstants.OMNIMIX_VERSION_BUMP
else:

View File

@ -25,7 +25,7 @@ class StatisticsObject(BaseObject):
@property
def music_version(self) -> int:
if self.game in [GameConstants.IIDX, GameConstants.MUSECA]:
if self.game in {GameConstants.IIDX, GameConstants.MUSECA}:
if self.omnimix:
return self.version + DBConstants.OMNIMIX_VERSION_BUMP
else:
@ -34,12 +34,12 @@ class StatisticsObject(BaseObject):
return self.version
def __is_play(self, attempt: Attempt) -> bool:
if self.game in [
if self.game in {
GameConstants.DDR,
GameConstants.JUBEAT,
GameConstants.MUSECA,
GameConstants.POPN_MUSIC,
]:
}:
return True
if self.game == GameConstants.IIDX:
return attempt.data.get_int('clear_status') != DBConstants.IIDX_CLEAR_STATUS_NO_PLAY