Switch to sets for membership queries.
This commit is contained in:
parent
3dd3f9ab07
commit
4f61cfe30a
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user