diff --git a/bemani/api/app.py b/bemani/api/app.py index b711e04..59d4368 100644 --- a/bemani/api/app.py +++ b/bemani/api/app.py @@ -207,7 +207,7 @@ def lookup(protoversion: str, requestgame: str, requestversion: str) -> Dict[str # Figure out what games we support based on config, and map those. gamemapping = {} - for (gameid, constant) in [ + for gameid, constant in [ ("ddr", GameConstants.DDR), ("iidx", GameConstants.IIDX), ("jubeat", GameConstants.JUBEAT), diff --git a/bemani/api/objects/profile.py b/bemani/api/objects/profile.py index e4eeab8..1e38f35 100644 --- a/bemani/api/objects/profile.py +++ b/bemani/api/objects/profile.py @@ -119,7 +119,7 @@ class ProfileObject(BaseObject): # Now, fetch the users, and filter out profiles belonging to orphaned users retval: List[Dict[str, Any]] = [] id_to_cards: Dict[UserID, List[str]] = {} - for (userid, profile) in profiles: + for userid, profile in profiles: if userid not in id_to_cards: cards = self.data.local.user.get_cards(userid) if len(cards) == 0: diff --git a/bemani/api/objects/records.py b/bemani/api/objects/records.py index e1cd399..33372dd 100644 --- a/bemani/api/objects/records.py +++ b/bemani/api/objects/records.py @@ -306,7 +306,7 @@ class RecordsObject(BaseObject): # Now, fetch the users, and filter out scores belonging to orphaned users id_to_cards: Dict[UserID, List[str]] = {} retval: List[Dict[str, Any]] = [] - for (userid, record) in records: + for userid, record in records: # Postfilter for queries that can't filter. This will save on data transferred. if since is not None: if record.update < since: diff --git a/bemani/api/objects/statistics.py b/bemani/api/objects/statistics.py index 65bcb70..e389cfa 100644 --- a/bemani/api/objects/statistics.py +++ b/bemani/api/objects/statistics.py @@ -182,7 +182,7 @@ class StatisticsObject(BaseObject): ) -> List[Dict[str, Any]]: stats: Dict[UserID, Dict[int, Dict[int, Dict[str, int]]]] = {} - for (userid, attempt) in attempts: + for userid, attempt in attempts: if userid not in stats: stats[userid] = {} if attempt.id not in stats[userid]: diff --git a/bemani/backend/bishi/bishi.py b/bemani/backend/bishi/bishi.py index aef9953..c573d62 100644 --- a/bemani/backend/bishi/bishi.py +++ b/bemani/backend/bishi/bishi.py @@ -21,7 +21,6 @@ class TheStarBishiBashi( EventLogHandler, BishiBashiBase, ): - name: str = "The★BishiBashi" version: int = VersionConstants.BISHI_BASHI_TSBB diff --git a/bemani/backend/bishi/factory.py b/bemani/backend/bishi/factory.py index 2a5cbce..04ea692 100644 --- a/bemani/backend/bishi/factory.py +++ b/bemani/backend/bishi/factory.py @@ -7,7 +7,6 @@ from bemani.data import Config, Data class BishiBashiFactory(Factory): - MANAGED_CLASSES: List[Type[Base]] = [ TheStarBishiBashi, ] @@ -25,7 +24,6 @@ class BishiBashiFactory(Factory): model: Model, parentmodel: Optional[Model] = None, ) -> Optional[Base]: - if model.gamecode == "IBB": return TheStarBishiBashi(data, config, model) diff --git a/bemani/backend/core/eacoin.py b/bemani/backend/core/eacoin.py index 8eb9e1b..dc9411d 100644 --- a/bemani/backend/core/eacoin.py +++ b/bemani/backend/core/eacoin.py @@ -422,7 +422,7 @@ class PASELIHandler(Base): ) topic.add_child(Node.string("sumto", Time.format(this_month, date_format))) - for (start, end) in [(month_before, last_month), (last_month, this_month)]: + for start, end in [(month_before, last_month), (last_month, this_month)]: year, month, _ = Time.date_from_timestamp(start) items = [] diff --git a/bemani/backend/ddr/common.py b/bemani/backend/ddr/common.py index 1cd94dc..4cbffc2 100644 --- a/bemani/backend/ddr/common.py +++ b/bemani/backend/ddr/common.py @@ -58,7 +58,7 @@ class DDRGameHiscoreHandler(DDRBase): sortedrecords: Dict[int, Dict[int, Tuple[UserID, Score]]] = {} missing_profiles = [] - for (userid, score) in records: + for userid, score in records: if score.id not in sortedrecords: sortedrecords[score.id] = {} sortedrecords[score.id][score.chart] = (userid, score) @@ -124,7 +124,7 @@ class DDRGameAreaHiscoreHandler(DDRBase): # to think about how to change this knowing that we only pulled # up area records. area_records: Dict[int, Dict[int, Tuple[UserID, Score]]] = {} - for (userid, score) in records: + for userid, score in records: if score.id not in area_records: area_records[score.id] = {} area_records[score.id][score.chart] = (userid, score) diff --git a/bemani/backend/ddr/ddr2013.py b/bemani/backend/ddr/ddr2013.py index 9cea2b2..ff85a74 100644 --- a/bemani/backend/ddr/ddr2013.py +++ b/bemani/backend/ddr/ddr2013.py @@ -52,7 +52,6 @@ class DDR2013( DDRGameTraceHandler, DDRBase, ): - name: str = "DanceDanceRevolution 2013" version: int = VersionConstants.DDR_2013 @@ -176,7 +175,7 @@ class DDR2013( self.game, self.music_version, self.GAME_MAX_SONGS ) counts_by_reflink = [0] * self.GAME_MAX_SONGS - for (reflink, plays) in hit_chart: + for reflink, plays in hit_chart: if reflink >= 0 and reflink < self.GAME_MAX_SONGS: counts_by_reflink[reflink] = plays game.add_child(Node.u32_array("cnt_music", counts_by_reflink)) diff --git a/bemani/backend/ddr/ddr2014.py b/bemani/backend/ddr/ddr2014.py index 3e33a6d..5742419 100644 --- a/bemani/backend/ddr/ddr2014.py +++ b/bemani/backend/ddr/ddr2014.py @@ -46,7 +46,6 @@ class DDR2014( DDRGameTaxInfoHandler, DDRBase, ): - name: str = "DanceDanceRevolution 2014" version: int = VersionConstants.DDR_2014 @@ -171,7 +170,7 @@ class DDR2014( self.game, self.music_version, self.GAME_MAX_SONGS, 30 ) counts_by_reflink = [0] * self.GAME_MAX_SONGS - for (reflink, plays) in hit_chart: + for reflink, plays in hit_chart: if reflink >= 0 and reflink < self.GAME_MAX_SONGS: counts_by_reflink[reflink] = plays game.add_child(Node.u32_array("cnt_music_monthly", counts_by_reflink)) @@ -181,7 +180,7 @@ class DDR2014( self.game, self.music_version, self.GAME_MAX_SONGS, 7 ) counts_by_reflink = [0] * self.GAME_MAX_SONGS - for (reflink, plays) in hit_chart: + for reflink, plays in hit_chart: if reflink >= 0 and reflink < self.GAME_MAX_SONGS: counts_by_reflink[reflink] = plays game.add_child(Node.u32_array("cnt_music_weekly", counts_by_reflink)) @@ -191,7 +190,7 @@ class DDR2014( self.game, self.music_version, self.GAME_MAX_SONGS, 1 ) counts_by_reflink = [0] * self.GAME_MAX_SONGS - for (reflink, plays) in hit_chart: + for reflink, plays in hit_chart: if reflink >= 0 and reflink < self.GAME_MAX_SONGS: counts_by_reflink[reflink] = plays game.add_child(Node.u32_array("cnt_music_daily", counts_by_reflink)) diff --git a/bemani/backend/ddr/ddra20.py b/bemani/backend/ddr/ddra20.py index 6cd87e7..782803f 100644 --- a/bemani/backend/ddr/ddra20.py +++ b/bemani/backend/ddr/ddra20.py @@ -9,7 +9,6 @@ from bemani.common import VersionConstants class DDRA20( DDRBase, ): - name: str = "DanceDanceRevolution A20" version: int = VersionConstants.DDR_A20 diff --git a/bemani/backend/ddr/ddrace.py b/bemani/backend/ddr/ddrace.py index 3c211e6..bce2799 100644 --- a/bemani/backend/ddr/ddrace.py +++ b/bemani/backend/ddr/ddrace.py @@ -23,7 +23,6 @@ class DDRAce( DDRBase, EventLogHandler, ): - name: str = "DanceDanceRevolution A" version: int = VersionConstants.DDR_ACE @@ -623,7 +622,7 @@ class DDRAce( missing_users = [ userid for (userid, _) in scores if userid not in profiles_by_userid ] - for (userid, profile) in self.get_any_profiles(missing_users): + for userid, profile in self.get_any_profiles(missing_users): profiles_by_userid[userid] = profile for userid, score in scores: diff --git a/bemani/backend/ddr/ddrx2.py b/bemani/backend/ddr/ddrx2.py index 35cb384..a66a241 100644 --- a/bemani/backend/ddr/ddrx2.py +++ b/bemani/backend/ddr/ddrx2.py @@ -42,7 +42,6 @@ class DDRX2( DDRGameTraceHandler, DDRBase, ): - name: str = "DanceDanceRevolution X2" version: int = VersionConstants.DDR_X2 @@ -161,7 +160,7 @@ class DDRX2( self.game, self.music_version, self.GAME_MAX_SONGS ) counts_by_reflink = [0] * self.GAME_MAX_SONGS - for (reflink, plays) in hit_chart: + for reflink, plays in hit_chart: if reflink >= 0 and reflink < self.GAME_MAX_SONGS: counts_by_reflink[reflink] = plays game.add_child(Node.u32_array("cnt_music", counts_by_reflink)) @@ -176,7 +175,7 @@ class DDRX2( sortedrecords: Dict[int, Dict[int, Tuple[UserID, Score]]] = {} missing_profiles = [] - for (userid, score) in records: + for userid, score in records: if score.id not in sortedrecords: sortedrecords[score.id] = {} sortedrecords[score.id][score.chart] = (userid, score) diff --git a/bemani/backend/ddr/ddrx3.py b/bemani/backend/ddr/ddrx3.py index f06f37b..9d2554c 100644 --- a/bemani/backend/ddr/ddrx3.py +++ b/bemani/backend/ddr/ddrx3.py @@ -48,7 +48,6 @@ class DDRX3( DDRGameTraceHandler, DDRBase, ): - name: str = "DanceDanceRevolution X3 VS 2ndMIX" version: int = VersionConstants.DDR_X3_VS_2NDMIX @@ -170,7 +169,7 @@ class DDRX3( self.game, self.music_version, self.GAME_MAX_SONGS ) counts_by_reflink = [0] * self.GAME_MAX_SONGS - for (reflink, plays) in hit_chart: + for reflink, plays in hit_chart: if reflink >= 0 and reflink < self.GAME_MAX_SONGS: counts_by_reflink[reflink] = plays game.add_child(Node.u32_array("cnt_music", counts_by_reflink)) diff --git a/bemani/backend/ddr/factory.py b/bemani/backend/ddr/factory.py index a0138d3..3d8f7a5 100644 --- a/bemani/backend/ddr/factory.py +++ b/bemani/backend/ddr/factory.py @@ -25,7 +25,6 @@ from bemani.data import Config, Data class DDRFactory(Factory): - MANAGED_CLASSES: List[Type[Base]] = [ DDR1stMix, DDR2ndMix, diff --git a/bemani/backend/ddr/stubs.py b/bemani/backend/ddr/stubs.py index fc5eaec..de3e26a 100644 --- a/bemani/backend/ddr/stubs.py +++ b/bemani/backend/ddr/stubs.py @@ -6,7 +6,6 @@ from bemani.common import VersionConstants class DDRX(DDRBase): - name: str = "DanceDanceRevolution X" version: int = VersionConstants.DDR_X @@ -15,7 +14,6 @@ class DDRX(DDRBase): class DDRSuperNova2(DDRBase): - name: str = "DanceDanceRevolution SuperNova 2" version: int = VersionConstants.DDR_SUPERNOVA_2 @@ -24,7 +22,6 @@ class DDRSuperNova2(DDRBase): class DDRSuperNova(DDRBase): - name: str = "DanceDanceRevolution SuperNova" version: int = VersionConstants.DDR_SUPERNOVA @@ -33,7 +30,6 @@ class DDRSuperNova(DDRBase): class DDRExtreme(DDRBase): - name: str = "DanceDanceRevolution Extreme" version: int = VersionConstants.DDR_EXTREME @@ -42,7 +38,6 @@ class DDRExtreme(DDRBase): class DDR7thMix(DDRBase): - name: str = "DanceDanceRevolution 7thMix" version: int = VersionConstants.DDR_7THMIX @@ -51,7 +46,6 @@ class DDR7thMix(DDRBase): class DDR6thMix(DDRBase): - name: str = "DanceDanceRevolution 6thMix" version: int = VersionConstants.DDR_6THMIX @@ -60,7 +54,6 @@ class DDR6thMix(DDRBase): class DDR5thMix(DDRBase): - name: str = "DanceDanceRevolution 5thMix" version: int = VersionConstants.DDR_5THMIX @@ -69,7 +62,6 @@ class DDR5thMix(DDRBase): class DDR4thMix(DDRBase): - name: str = "DanceDanceRevolution 4thMix" version: int = VersionConstants.DDR_4THMIX @@ -78,7 +70,6 @@ class DDR4thMix(DDRBase): class DDR3rdMix(DDRBase): - name: str = "DanceDanceRevolution 3rdMix" version: int = VersionConstants.DDR_3RDMIX @@ -87,7 +78,6 @@ class DDR3rdMix(DDRBase): class DDR2ndMix(DDRBase): - name: str = "DanceDanceRevolution 2ndMix" version: int = VersionConstants.DDR_2NDMIX @@ -96,6 +86,5 @@ class DDR2ndMix(DDRBase): class DDR1stMix(DDRBase): - name: str = "DanceDanceRevolution 1stMix" version: int = VersionConstants.DDR_1STMIX diff --git a/bemani/backend/iidx/base.py b/bemani/backend/iidx/base.py index 87df863..2b5bac8 100644 --- a/bemani/backend/iidx/base.py +++ b/bemani/backend/iidx/base.py @@ -237,7 +237,7 @@ class IIDXBase(CoreHandler, CardManagerHandler, PASELIHandler, Base): ) attempts: Dict[int, Dict[int, Dict[str, int]]] = {} - for (_, attempt) in all_attempts: + for _, attempt in all_attempts: if attempt.data.get_int("clear_status") == self.CLEAR_STATUS_NO_PLAY: # This attempt was outside of the clear infra, so don't bother with it. continue diff --git a/bemani/backend/iidx/bistrover.py b/bemani/backend/iidx/bistrover.py index 6886080..c5f76d4 100644 --- a/bemani/backend/iidx/bistrover.py +++ b/bemani/backend/iidx/bistrover.py @@ -7,7 +7,6 @@ from bemani.common import VersionConstants class IIDXBistrover(IIDXBase): - name: str = "Beatmania IIDX BISTROVER" version: int = VersionConstants.IIDX_BISTROVER diff --git a/bemani/backend/iidx/cannonballers.py b/bemani/backend/iidx/cannonballers.py index 880bf2a..805621a 100644 --- a/bemani/backend/iidx/cannonballers.py +++ b/bemani/backend/iidx/cannonballers.py @@ -22,7 +22,6 @@ from bemani.protocol import Node class IIDXCannonBallers(IIDXCourse, IIDXBase): - name: str = "Beatmania IIDX CANNON BALLERS" version: int = VersionConstants.IIDX_CANNON_BALLERS @@ -844,7 +843,7 @@ class IIDXCannonBallers(IIDXCourse, IIDXBase): reverse=True, ) missing_players = [uid for (uid, _) in all_scores if uid not in all_players] - for (uid, prof) in self.get_any_profiles(missing_players): + for uid, prof in self.get_any_profiles(missing_players): all_players[uid] = prof if not global_scores: diff --git a/bemani/backend/iidx/copula.py b/bemani/backend/iidx/copula.py index b0cae55..890afc6 100644 --- a/bemani/backend/iidx/copula.py +++ b/bemani/backend/iidx/copula.py @@ -21,7 +21,6 @@ from bemani.protocol import Node class IIDXCopula(IIDXCourse, IIDXBase): - name: str = "Beatmania IIDX copula" version: int = VersionConstants.IIDX_COPULA @@ -721,7 +720,7 @@ class IIDXCopula(IIDXCourse, IIDXBase): reverse=True, ) missing_players = [uid for (uid, _) in all_scores if uid not in all_players] - for (uid, prof) in self.get_any_profiles(missing_players): + for uid, prof in self.get_any_profiles(missing_players): all_players[uid] = prof if not global_scores: diff --git a/bemani/backend/iidx/course.py b/bemani/backend/iidx/course.py index 8873ef2..d92e4c8 100644 --- a/bemani/backend/iidx/course.py +++ b/bemani/backend/iidx/course.py @@ -8,7 +8,6 @@ from bemani.data import UserID class IIDXCourse(IIDXBase): - COURSE_TYPE_SECRET: Final[str] = "secret_course" COURSE_TYPE_INTERNET_RANKING: Final[str] = "ir_course" COURSE_TYPE_CLASSIC: Final[str] = "classic_course" diff --git a/bemani/backend/iidx/factory.py b/bemani/backend/iidx/factory.py index 8981197..a4a9c12 100644 --- a/bemani/backend/iidx/factory.py +++ b/bemani/backend/iidx/factory.py @@ -36,7 +36,6 @@ from bemani.data import Config, Data class IIDXFactory(Factory): - MANAGED_CLASSES: List[Type[Base]] = [ IIDX1stStyle, IIDX2ndStyle, diff --git a/bemani/backend/iidx/heroicverse.py b/bemani/backend/iidx/heroicverse.py index 4ecb650..1f48ff1 100644 --- a/bemani/backend/iidx/heroicverse.py +++ b/bemani/backend/iidx/heroicverse.py @@ -7,7 +7,6 @@ from bemani.common import VersionConstants class IIDXHeroicVerse(IIDXBase): - name: str = "Beatmania IIDX HEROIC VERSE" version: int = VersionConstants.IIDX_HEROIC_VERSE diff --git a/bemani/backend/iidx/pendual.py b/bemani/backend/iidx/pendual.py index 1545804..a94d7de 100644 --- a/bemani/backend/iidx/pendual.py +++ b/bemani/backend/iidx/pendual.py @@ -21,7 +21,6 @@ from bemani.protocol import Node class IIDXPendual(IIDXCourse, IIDXBase): - name: str = "Beatmania IIDX PENDUAL" version: int = VersionConstants.IIDX_PENDUAL @@ -724,7 +723,7 @@ class IIDXPendual(IIDXCourse, IIDXBase): reverse=True, ) missing_players = [uid for (uid, _) in all_scores if uid not in all_players] - for (uid, prof) in self.get_any_profiles(missing_players): + for uid, prof in self.get_any_profiles(missing_players): all_players[uid] = prof if not global_scores: @@ -1301,7 +1300,7 @@ class IIDXPendual(IIDXCourse, IIDXBase): # Ranking details in title screen rankingcharts = [] - for (mid, _plays) in self.data.local.music.get_hit_chart( + for mid, _plays in self.data.local.music.get_hit_chart( self.game, self.music_version, 20 ): rankingcharts.append(mid) diff --git a/bemani/backend/iidx/rootage.py b/bemani/backend/iidx/rootage.py index 174cd39..68a2995 100644 --- a/bemani/backend/iidx/rootage.py +++ b/bemani/backend/iidx/rootage.py @@ -22,7 +22,6 @@ from bemani.protocol import Node class IIDXRootage(IIDXCourse, IIDXBase): - name: str = "Beatmania IIDX ROOTAGE" version: int = VersionConstants.IIDX_ROOTAGE @@ -698,7 +697,7 @@ class IIDXRootage(IIDXCourse, IIDXBase): reverse=True, ) missing_players = [uid for (uid, _) in all_scores if uid not in all_players] - for (uid, prof) in self.get_any_profiles(missing_players): + for uid, prof in self.get_any_profiles(missing_players): all_players[uid] = prof if not global_scores: diff --git a/bemani/backend/iidx/sinobuz.py b/bemani/backend/iidx/sinobuz.py index 675ffd0..d4d26d9 100644 --- a/bemani/backend/iidx/sinobuz.py +++ b/bemani/backend/iidx/sinobuz.py @@ -22,7 +22,6 @@ from bemani.protocol import Node class IIDXSinobuz(IIDXCourse, IIDXBase): - name: str = "Beatmania IIDX SINOBUZ" version: int = VersionConstants.IIDX_SINOBUZ @@ -845,7 +844,7 @@ class IIDXSinobuz(IIDXCourse, IIDXBase): reverse=True, ) missing_players = [uid for (uid, _) in all_scores if uid not in all_players] - for (uid, prof) in self.get_any_profiles(missing_players): + for uid, prof in self.get_any_profiles(missing_players): all_players[uid] = prof if not global_scores: diff --git a/bemani/backend/iidx/spada.py b/bemani/backend/iidx/spada.py index fe76efc..b5d1ddd 100644 --- a/bemani/backend/iidx/spada.py +++ b/bemani/backend/iidx/spada.py @@ -20,7 +20,6 @@ from bemani.protocol import Node class IIDXSpada(IIDXBase): - name: str = "Beatmania IIDX SPADA" version: int = VersionConstants.IIDX_SPADA @@ -655,7 +654,7 @@ class IIDXSpada(IIDXBase): reverse=True, ) missing_players = [uid for (uid, _) in all_scores if uid not in all_players] - for (uid, prof) in self.get_any_profiles(missing_players): + for uid, prof in self.get_any_profiles(missing_players): all_players[uid] = prof if not global_scores: diff --git a/bemani/backend/iidx/stubs.py b/bemani/backend/iidx/stubs.py index e719733..07abbaa 100644 --- a/bemani/backend/iidx/stubs.py +++ b/bemani/backend/iidx/stubs.py @@ -6,13 +6,11 @@ from bemani.common import VersionConstants class IIDX1stStyle(IIDXBase): - name: str = "Beatmania IIDX 1st style & substream" version: int = VersionConstants.IIDX class IIDX2ndStyle(IIDXBase): - name: str = "Beatmania IIDX 2nd style" version: int = VersionConstants.IIDX_2ND_STYLE @@ -21,7 +19,6 @@ class IIDX2ndStyle(IIDXBase): class IIDX3rdStyle(IIDXBase): - name: str = "Beatmania IIDX 3rd style" version: int = VersionConstants.IIDX_3RD_STYLE @@ -30,7 +27,6 @@ class IIDX3rdStyle(IIDXBase): class IIDX4thStyle(IIDXBase): - name: str = "Beatmania IIDX 4th style" version: int = VersionConstants.IIDX_4TH_STYLE @@ -39,7 +35,6 @@ class IIDX4thStyle(IIDXBase): class IIDX5thStyle(IIDXBase): - name: str = "Beatmania IIDX 5th style" version: int = VersionConstants.IIDX_5TH_STYLE @@ -48,7 +43,6 @@ class IIDX5thStyle(IIDXBase): class IIDX6thStyle(IIDXBase): - name: str = "Beatmania IIDX 6th style" version: int = VersionConstants.IIDX_6TH_STYLE @@ -57,7 +51,6 @@ class IIDX6thStyle(IIDXBase): class IIDX7thStyle(IIDXBase): - name: str = "Beatmania IIDX 7th style" version: int = VersionConstants.IIDX_7TH_STYLE @@ -66,7 +59,6 @@ class IIDX7thStyle(IIDXBase): class IIDX8thStyle(IIDXBase): - name: str = "Beatmania IIDX 8th style" version: int = VersionConstants.IIDX_8TH_STYLE @@ -75,7 +67,6 @@ class IIDX8thStyle(IIDXBase): class IIDX9thStyle(IIDXBase): - name: str = "Beatmania IIDX 9th style" version: int = VersionConstants.IIDX_9TH_STYLE @@ -84,7 +75,6 @@ class IIDX9thStyle(IIDXBase): class IIDX10thStyle(IIDXBase): - name: str = "Beatmania IIDX 10th style" version: int = VersionConstants.IIDX_10TH_STYLE @@ -93,7 +83,6 @@ class IIDX10thStyle(IIDXBase): class IIDXRed(IIDXBase): - name: str = "Beatmania IIDX RED" version: int = VersionConstants.IIDX_RED @@ -102,7 +91,6 @@ class IIDXRed(IIDXBase): class IIDXHappySky(IIDXBase): - name: str = "Beatmania IIDX HAPPY SKY" version: int = VersionConstants.IIDX_HAPPY_SKY @@ -111,7 +99,6 @@ class IIDXHappySky(IIDXBase): class IIDXDistorted(IIDXBase): - name: str = "Beatmania IIDX DistorteD" version: int = VersionConstants.IIDX_DISTORTED @@ -120,7 +107,6 @@ class IIDXDistorted(IIDXBase): class IIDXGold(IIDXBase): - name: str = "Beatmania IIDX GOLD" version: int = VersionConstants.IIDX_GOLD @@ -129,7 +115,6 @@ class IIDXGold(IIDXBase): class IIDXDJTroopers(IIDXBase): - name: str = "Beatmania IIDX DJ TROOPERS" version: int = VersionConstants.IIDX_DJ_TROOPERS @@ -138,7 +123,6 @@ class IIDXDJTroopers(IIDXBase): class IIDXEmpress(IIDXBase): - name: str = "Beatmania IIDX EMPRESS" version: int = VersionConstants.IIDX_EMPRESS @@ -147,7 +131,6 @@ class IIDXEmpress(IIDXBase): class IIDXSirius(IIDXBase): - name: str = "Beatmania IIDX SIRIUS" version: int = VersionConstants.IIDX_SIRIUS @@ -156,7 +139,6 @@ class IIDXSirius(IIDXBase): class IIDXResortAnthem(IIDXBase): - name: str = "Beatmania IIDX Resort Anthem" version: int = VersionConstants.IIDX_RESORT_ANTHEM @@ -165,7 +147,6 @@ class IIDXResortAnthem(IIDXBase): class IIDXLincle(IIDXBase): - name: str = "Beatmania IIDX Lincle" version: int = VersionConstants.IIDX_LINCLE diff --git a/bemani/backend/iidx/tricoro.py b/bemani/backend/iidx/tricoro.py index 589783e..52b02d9 100644 --- a/bemani/backend/iidx/tricoro.py +++ b/bemani/backend/iidx/tricoro.py @@ -12,7 +12,6 @@ from bemani.protocol import Node class IIDXTricoro(IIDXBase): - name: str = "Beatmania IIDX Tricoro" version: int = VersionConstants.IIDX_TRICORO @@ -647,7 +646,7 @@ class IIDXTricoro(IIDXBase): reverse=True, ) missing_players = [uid for (uid, _) in all_scores if uid not in all_players] - for (uid, prof) in self.get_any_profiles(missing_players): + for uid, prof in self.get_any_profiles(missing_players): all_players[uid] = prof if not global_scores: diff --git a/bemani/backend/jubeat/avenue.py b/bemani/backend/jubeat/avenue.py index 32432b6..2d33ffd 100644 --- a/bemani/backend/jubeat/avenue.py +++ b/bemani/backend/jubeat/avenue.py @@ -7,7 +7,6 @@ from bemani.common import VersionConstants class JubeatAvenue(JubeatBase): - name: str = "Jubeat Avenue" version: int = VersionConstants.JUBEAT_AVENUE diff --git a/bemani/backend/jubeat/clan.py b/bemani/backend/jubeat/clan.py index 72f205e..2377da2 100644 --- a/bemani/backend/jubeat/clan.py +++ b/bemani/backend/jubeat/clan.py @@ -29,7 +29,6 @@ class JubeatClan( JubeatLoggerReportHandler, JubeatBase, ): - name: str = "Jubeat Clan" version: int = VersionConstants.JUBEAT_CLAN diff --git a/bemani/backend/jubeat/course.py b/bemani/backend/jubeat/course.py index 422b7cf..c6bb027 100644 --- a/bemani/backend/jubeat/course.py +++ b/bemani/backend/jubeat/course.py @@ -7,7 +7,6 @@ from bemani.backend.jubeat.base import JubeatBase class JubeatCourse(JubeatBase): - COURSE_RATING_FAILED: Final[int] = 100 COURSE_RATING_BRONZE: Final[int] = 200 COURSE_RATING_SILVER: Final[int] = 300 diff --git a/bemani/backend/jubeat/factory.py b/bemani/backend/jubeat/factory.py index 44ae57a..f69dba8 100644 --- a/bemani/backend/jubeat/factory.py +++ b/bemani/backend/jubeat/factory.py @@ -22,7 +22,6 @@ from bemani.data import Config, Data class JubeatFactory(Factory): - MANAGED_CLASSES: List[Type[Base]] = [ Jubeat, JubeatRipples, diff --git a/bemani/backend/jubeat/festo.py b/bemani/backend/jubeat/festo.py index e021e9b..19d59c0 100644 --- a/bemani/backend/jubeat/festo.py +++ b/bemani/backend/jubeat/festo.py @@ -29,7 +29,6 @@ class JubeatFesto( JubeatLoggerReportHandler, JubeatBase, ): - name: str = "Jubeat Festo" version: int = VersionConstants.JUBEAT_FESTO diff --git a/bemani/backend/jubeat/prop.py b/bemani/backend/jubeat/prop.py index 2ef0d8a..45e2b67 100644 --- a/bemani/backend/jubeat/prop.py +++ b/bemani/backend/jubeat/prop.py @@ -31,7 +31,6 @@ class JubeatProp( JubeatCourse, JubeatBase, ): - name: str = "Jubeat Prop" version: int = VersionConstants.JUBEAT_PROP @@ -1621,7 +1620,6 @@ class JubeatProp( def format_scores( self, userid: UserID, profile: Profile, scores: List[Score] ) -> Node: - root = Node.void("gametop") datanode = Node.void("data") root.add_child(datanode) diff --git a/bemani/backend/jubeat/qubell.py b/bemani/backend/jubeat/qubell.py index 040e9c8..3be1981 100644 --- a/bemani/backend/jubeat/qubell.py +++ b/bemani/backend/jubeat/qubell.py @@ -29,7 +29,6 @@ class JubeatQubell( JubeatLoggerReportHandler, JubeatBase, ): - name: str = "Jubeat Qubell" version: int = VersionConstants.JUBEAT_QUBELL diff --git a/bemani/backend/jubeat/saucer.py b/bemani/backend/jubeat/saucer.py index 277f85f..d2c1387 100644 --- a/bemani/backend/jubeat/saucer.py +++ b/bemani/backend/jubeat/saucer.py @@ -27,7 +27,6 @@ class JubeatSaucer( JubeatLoggerReportHandler, JubeatBase, ): - name: str = "Jubeat Saucer" version: int = VersionConstants.JUBEAT_SAUCER @@ -905,7 +904,6 @@ class JubeatSaucer( def format_scores( self, userid: UserID, profile: Profile, scores: List[Score] ) -> Node: - root = Node.void("gametop") datanode = Node.void("data") root.add_child(datanode) diff --git a/bemani/backend/jubeat/saucerfulfill.py b/bemani/backend/jubeat/saucerfulfill.py index c94c128..58f4388 100644 --- a/bemani/backend/jubeat/saucerfulfill.py +++ b/bemani/backend/jubeat/saucerfulfill.py @@ -30,7 +30,6 @@ class JubeatSaucerFulfill( JubeatCourse, JubeatBase, ): - name: str = "Jubeat Saucer Fulfill" version: int = VersionConstants.JUBEAT_SAUCER_FULFILL @@ -1018,7 +1017,6 @@ class JubeatSaucerFulfill( def format_scores( self, userid: UserID, profile: Profile, scores: List[Score] ) -> Node: - root = Node.void("gametop") datanode = Node.void("data") root.add_child(datanode) diff --git a/bemani/backend/jubeat/stubs.py b/bemani/backend/jubeat/stubs.py index ae5aea3..2e6819c 100644 --- a/bemani/backend/jubeat/stubs.py +++ b/bemani/backend/jubeat/stubs.py @@ -6,13 +6,11 @@ from bemani.common import VersionConstants class Jubeat(JubeatBase): - name: str = "Jubeat" version: int = VersionConstants.JUBEAT class JubeatRipples(JubeatBase): - name: str = "Jubeat Ripples" version: int = VersionConstants.JUBEAT_RIPPLES @@ -21,7 +19,6 @@ class JubeatRipples(JubeatBase): class JubeatRipplesAppend(JubeatBase): - name: str = "Jubeat Ripples Append" version: int = VersionConstants.JUBEAT_RIPPLES_APPEND @@ -30,7 +27,6 @@ class JubeatRipplesAppend(JubeatBase): class JubeatKnit(JubeatBase): - name: str = "Jubeat Knit" version: int = VersionConstants.JUBEAT_KNIT @@ -39,7 +35,6 @@ class JubeatKnit(JubeatBase): class JubeatKnitAppend(JubeatBase): - name: str = "Jubeat Knit Append" version: int = VersionConstants.JUBEAT_KNIT_APPEND @@ -48,7 +43,6 @@ class JubeatKnitAppend(JubeatBase): class JubeatCopious(JubeatBase): - name: str = "Jubeat Copious" version: int = VersionConstants.JUBEAT_COPIOUS @@ -57,7 +51,6 @@ class JubeatCopious(JubeatBase): class JubeatCopiousAppend(JubeatBase): - name: str = "Jubeat Copious Append" version: int = VersionConstants.JUBEAT_COPIOUS_APPEND diff --git a/bemani/backend/mga/factory.py b/bemani/backend/mga/factory.py index ee9dffc..d8c807a 100644 --- a/bemani/backend/mga/factory.py +++ b/bemani/backend/mga/factory.py @@ -7,7 +7,6 @@ from bemani.data import Config, Data class MetalGearArcadeFactory(Factory): - MANAGED_CLASSES: List[Type[Base]] = [ MetalGearArcade, ] @@ -25,7 +24,6 @@ class MetalGearArcadeFactory(Factory): model: Model, parentmodel: Optional[Model] = None, ) -> Optional[Base]: - if model.gamecode == "I36": return MetalGearArcade(data, config, model) diff --git a/bemani/backend/mga/mga.py b/bemani/backend/mga/mga.py index 9aed698..99c2f3a 100644 --- a/bemani/backend/mga/mga.py +++ b/bemani/backend/mga/mga.py @@ -13,7 +13,6 @@ class MetalGearArcade( EventLogHandler, MetalGearArcadeBase, ): - name: str = "Metal Gear Arcade" version: int = VersionConstants.MGA diff --git a/bemani/backend/museca/base.py b/bemani/backend/museca/base.py index 17e9787..cc3b96a 100644 --- a/bemani/backend/museca/base.py +++ b/bemani/backend/museca/base.py @@ -166,7 +166,7 @@ class MusecaBase(CoreHandler, CardManagerHandler, PASELIHandler, Base): ] ) attempts: Dict[int, Dict[int, Dict[str, int]]] = {} - for (_, attempt) in all_attempts: + for _, attempt in all_attempts: # Terrible temporary structure is terrible. if attempt.id not in attempts: attempts[attempt.id] = {} diff --git a/bemani/backend/museca/common.py b/bemani/backend/museca/common.py index 384fa5c..1b9325e 100644 --- a/bemani/backend/museca/common.py +++ b/bemani/backend/museca/common.py @@ -26,7 +26,7 @@ class MusecaGameHiscoreHandler(MusecaBase): hitchart = Node.void("hitchart") game.add_child(hitchart) - for (songid, count) in playcounts: + for songid, count in playcounts: info = Node.void("info") hitchart.add_child(info) info.add_child(Node.u32("id", songid)) @@ -42,7 +42,7 @@ class MusecaGameHiscoreHandler(MusecaBase): game.add_child(hiscore_allover) # Output records - for (userid, score) in records: + for userid, score in records: info = Node.void("info") if userid not in users: @@ -70,14 +70,14 @@ class MusecaGameHiscoreHandler(MusecaBase): self.game, self.version, userlist=area_users ) missing_players = [uid for (uid, _) in records if uid not in users] - for (uid, prof) in self.get_any_profiles(missing_players): + for uid, prof in self.get_any_profiles(missing_players): users[uid] = prof hiscore_location = Node.void("hiscore_location") game.add_child(hiscore_location) # Output records - for (userid, score) in records: + for userid, score in records: info = Node.void("info") if userid not in users: diff --git a/bemani/backend/museca/factory.py b/bemani/backend/museca/factory.py index 667cafe..8b678b2 100644 --- a/bemani/backend/museca/factory.py +++ b/bemani/backend/museca/factory.py @@ -8,7 +8,6 @@ from bemani.data import Config, Data class MusecaFactory(Factory): - MANAGED_CLASSES: List[Type[Base]] = [ Museca1, Museca1Plus, diff --git a/bemani/backend/museca/museca1.py b/bemani/backend/museca/museca1.py index 96d7e8d..b9fd059 100644 --- a/bemani/backend/museca/museca1.py +++ b/bemani/backend/museca/museca1.py @@ -28,7 +28,6 @@ class Museca1( MusecaGameShopHandler, MusecaBase, ): - name: str = "MÚSECA" version: int = VersionConstants.MUSECA @@ -125,7 +124,7 @@ class Museca1( ): ids.add((song.id, song.chart)) - for (songid, chart) in ids: + for songid, chart in ids: info = Node.void("info") limited.add_child(info) info.add_child(Node.s32("music_id", songid)) diff --git a/bemani/backend/museca/museca1plus.py b/bemani/backend/museca/museca1plus.py index 1ce45ad..080c30b 100644 --- a/bemani/backend/museca/museca1plus.py +++ b/bemani/backend/museca/museca1plus.py @@ -29,7 +29,6 @@ class Museca1Plus( MusecaGameShopHandler, MusecaBase, ): - name: str = "MÚSECA 1+1/2" version: int = VersionConstants.MUSECA_1_PLUS @@ -137,7 +136,7 @@ class Museca1Plus( ): ids.add((song.id, song.chart)) - for (songid, chart) in ids: + for songid, chart in ids: info = Node.void("info") limited.add_child(info) info.add_child(Node.s32("music_id", songid)) diff --git a/bemani/backend/popn/common.py b/bemani/backend/popn/common.py index 6979887..8e837b9 100644 --- a/bemani/backend/popn/common.py +++ b/bemani/backend/popn/common.py @@ -12,7 +12,6 @@ from bemani.protocol import Node class PopnMusicModernBase(PopnMusicBase, ABC): - # Chart type, as returned from the game GAME_CHART_TYPE_EASY: Final[int] = 0 GAME_CHART_TYPE_NORMAL: Final[int] = 1 @@ -304,7 +303,7 @@ class PopnMusicModernBase(PopnMusicBase, ABC): # Calculate most popular characters profiles = self.data.remote.user.get_all_profiles(self.game, self.version) charas: Dict[int, int] = {} - for (_userid, profile) in profiles: + for _userid, profile in profiles: chara = profile.get_int("chara", -1) if chara <= 0: continue @@ -328,7 +327,7 @@ class PopnMusicModernBase(PopnMusicBase, ABC): popular.add_child(Node.s16("chara_num", charaid)) # Top 500 Popular music - for (songid, _plays) in self.data.local.music.get_hit_chart( + for songid, _plays in self.data.local.music.get_hit_chart( self.game, self.version, 500 ): popular_music = Node.void("popular_music") diff --git a/bemani/backend/popn/eclale.py b/bemani/backend/popn/eclale.py index 5f5555d..46a81fe 100644 --- a/bemani/backend/popn/eclale.py +++ b/bemani/backend/popn/eclale.py @@ -12,7 +12,6 @@ from bemani.protocol import Node class PopnMusicEclale(PopnMusicBase): - name: str = "Pop'n Music éclale" version: int = VersionConstants.POPN_MUSIC_ECLALE @@ -184,7 +183,7 @@ class PopnMusicEclale(PopnMusicBase): # Calculate most popular characters profiles = self.data.remote.user.get_all_profiles(self.game, self.version) charas: Dict[int, int] = {} - for (_userid, profile) in profiles: + for _userid, profile in profiles: chara = profile.get_int("chara", -1) if chara <= 0: continue @@ -202,7 +201,7 @@ class PopnMusicEclale(PopnMusicBase): # Output the top 20 of them rank = 1 - for (charaid, _usecount) in charamap[:20]: + for charaid, _usecount in charamap[:20]: popular = Node.void("popular") root.add_child(popular) popular.add_child(Node.s16("rank", rank)) @@ -210,7 +209,7 @@ class PopnMusicEclale(PopnMusicBase): rank = rank + 1 # Output the hit chart - for (songid, _plays) in self.data.local.music.get_hit_chart( + for songid, _plays in self.data.local.music.get_hit_chart( self.game, self.version, 500 ): popular_music = Node.void("popular_music") diff --git a/bemani/backend/popn/factory.py b/bemani/backend/popn/factory.py index 1a22f79..295c3d7 100644 --- a/bemani/backend/popn/factory.py +++ b/bemani/backend/popn/factory.py @@ -34,7 +34,6 @@ from bemani.data import Config, Data class PopnMusicFactory(Factory): - MANAGED_CLASSES: List[Type[Base]] = [ PopnMusic, PopnMusic2, diff --git a/bemani/backend/popn/fantasia.py b/bemani/backend/popn/fantasia.py index 4b124de..1a1fb34 100644 --- a/bemani/backend/popn/fantasia.py +++ b/bemani/backend/popn/fantasia.py @@ -12,7 +12,6 @@ from bemani.protocol import Node class PopnMusicFantasia(PopnMusicBase): - name: str = "Pop'n Music fantasia" version: int = VersionConstants.POPN_MUSIC_FANTASIA diff --git a/bemani/backend/popn/kaimei.py b/bemani/backend/popn/kaimei.py index 3f536b9..dc94afc 100644 --- a/bemani/backend/popn/kaimei.py +++ b/bemani/backend/popn/kaimei.py @@ -13,7 +13,6 @@ from bemani.protocol.node import Node class PopnMusicKaimei(PopnMusicModernBase): - name: str = "Pop'n Music 解明リドルズ" version: int = VersionConstants.POPN_MUSIC_KAIMEI_RIDDLES diff --git a/bemani/backend/popn/lapistoria.py b/bemani/backend/popn/lapistoria.py index aa891f0..1427e5f 100644 --- a/bemani/backend/popn/lapistoria.py +++ b/bemani/backend/popn/lapistoria.py @@ -12,7 +12,6 @@ from bemani.protocol import Node class PopnMusicLapistoria(PopnMusicBase): - name: str = "Pop'n Music ラピストリア" version: int = VersionConstants.POPN_MUSIC_LAPISTORIA diff --git a/bemani/backend/popn/peace.py b/bemani/backend/popn/peace.py index 128b82a..e2a4181 100644 --- a/bemani/backend/popn/peace.py +++ b/bemani/backend/popn/peace.py @@ -8,7 +8,6 @@ from bemani.common import VersionConstants class PopnMusicPeace(PopnMusicModernBase): - name: str = "Pop'n Music peace" version: int = VersionConstants.POPN_MUSIC_PEACE diff --git a/bemani/backend/popn/stubs.py b/bemani/backend/popn/stubs.py index b3dbcd6..b99466f 100644 --- a/bemani/backend/popn/stubs.py +++ b/bemani/backend/popn/stubs.py @@ -6,13 +6,11 @@ from bemani.common import VersionConstants class PopnMusic(PopnMusicBase): - name: str = "Pop'n Music" version: int = VersionConstants.POPN_MUSIC class PopnMusic2(PopnMusicBase): - name: str = "Pop'n Music 2" version: int = VersionConstants.POPN_MUSIC_2 @@ -21,7 +19,6 @@ class PopnMusic2(PopnMusicBase): class PopnMusic3(PopnMusicBase): - name: str = "Pop'n Music 3" version: int = VersionConstants.POPN_MUSIC_3 @@ -30,7 +27,6 @@ class PopnMusic3(PopnMusicBase): class PopnMusic4(PopnMusicBase): - name: str = "Pop'n Music 4" version: int = VersionConstants.POPN_MUSIC_4 @@ -39,7 +35,6 @@ class PopnMusic4(PopnMusicBase): class PopnMusic5(PopnMusicBase): - name: str = "Pop'n Music 5" version: int = VersionConstants.POPN_MUSIC_5 @@ -48,7 +43,6 @@ class PopnMusic5(PopnMusicBase): class PopnMusic6(PopnMusicBase): - name: str = "Pop'n Music 6" version: int = VersionConstants.POPN_MUSIC_6 @@ -57,7 +51,6 @@ class PopnMusic6(PopnMusicBase): class PopnMusic7(PopnMusicBase): - name: str = "Pop'n Music 7" version: int = VersionConstants.POPN_MUSIC_7 @@ -66,7 +59,6 @@ class PopnMusic7(PopnMusicBase): class PopnMusic8(PopnMusicBase): - name: str = "Pop'n Music 8" version: int = VersionConstants.POPN_MUSIC_8 @@ -75,7 +67,6 @@ class PopnMusic8(PopnMusicBase): class PopnMusic9(PopnMusicBase): - name: str = "Pop'n Music 9" version: int = VersionConstants.POPN_MUSIC_9 @@ -84,7 +75,6 @@ class PopnMusic9(PopnMusicBase): class PopnMusic10(PopnMusicBase): - name: str = "Pop'n Music 10" version: int = VersionConstants.POPN_MUSIC_10 @@ -93,7 +83,6 @@ class PopnMusic10(PopnMusicBase): class PopnMusic11(PopnMusicBase): - name: str = "Pop'n Music 11" version: int = VersionConstants.POPN_MUSIC_11 @@ -102,7 +91,6 @@ class PopnMusic11(PopnMusicBase): class PopnMusicIroha(PopnMusicBase): - name: str = "Pop'n Music いろは" version: int = VersionConstants.POPN_MUSIC_IROHA @@ -111,7 +99,6 @@ class PopnMusicIroha(PopnMusicBase): class PopnMusicCarnival(PopnMusicBase): - name: str = "Pop'n Music カーニバル" version: int = VersionConstants.POPN_MUSIC_CARNIVAL @@ -120,7 +107,6 @@ class PopnMusicCarnival(PopnMusicBase): class PopnMusicFever(PopnMusicBase): - name: str = "Pop'n Music FEVER!" version: int = VersionConstants.POPN_MUSIC_FEVER @@ -129,7 +115,6 @@ class PopnMusicFever(PopnMusicBase): class PopnMusicAdventure(PopnMusicBase): - name: str = "Pop'n Music ADVENTURE" version: int = VersionConstants.POPN_MUSIC_ADVENTURE @@ -138,7 +123,6 @@ class PopnMusicAdventure(PopnMusicBase): class PopnMusicParty(PopnMusicBase): - name: str = "Pop'n Music Party♪" version: int = VersionConstants.POPN_MUSIC_PARTY @@ -147,7 +131,6 @@ class PopnMusicParty(PopnMusicBase): class PopnMusicTheMovie(PopnMusicBase): - name: str = "Pop'n Music THE MOVIE" version: int = VersionConstants.POPN_MUSIC_THE_MOVIE @@ -156,7 +139,6 @@ class PopnMusicTheMovie(PopnMusicBase): class PopnMusicSengokuRetsuden(PopnMusicBase): - name: str = "Pop'n Music せんごく列伝" version: int = VersionConstants.POPN_MUSIC_SENGOKU_RETSUDEN diff --git a/bemani/backend/popn/sunnypark.py b/bemani/backend/popn/sunnypark.py index 0221b09..cf4057f 100644 --- a/bemani/backend/popn/sunnypark.py +++ b/bemani/backend/popn/sunnypark.py @@ -12,7 +12,6 @@ from bemani.protocol import Node class PopnMusicSunnyPark(PopnMusicBase): - name: str = "Pop'n Music Sunny Park" version: int = VersionConstants.POPN_MUSIC_SUNNY_PARK diff --git a/bemani/backend/popn/tunestreet.py b/bemani/backend/popn/tunestreet.py index 073f3ae..22608ad 100644 --- a/bemani/backend/popn/tunestreet.py +++ b/bemani/backend/popn/tunestreet.py @@ -12,7 +12,6 @@ from bemani.protocol import Node class PopnMusicTuneStreet(PopnMusicBase): - name: str = "Pop'n Music TUNE STREET" version: int = VersionConstants.POPN_MUSIC_TUNE_STREET diff --git a/bemani/backend/popn/usaneko.py b/bemani/backend/popn/usaneko.py index 0512956..549f10d 100644 --- a/bemani/backend/popn/usaneko.py +++ b/bemani/backend/popn/usaneko.py @@ -8,7 +8,6 @@ from bemani.common import VersionConstants class PopnMusicUsaNeko(PopnMusicModernBase): - name: str = "Pop'n Music うさぎと猫と少年の夢" version: int = VersionConstants.POPN_MUSIC_USANEKO diff --git a/bemani/backend/reflec/colette.py b/bemani/backend/reflec/colette.py index abb6670..89a40fc 100644 --- a/bemani/backend/reflec/colette.py +++ b/bemani/backend/reflec/colette.py @@ -10,7 +10,6 @@ from bemani.protocol import Node class ReflecBeatColette(ReflecBeatBase): - name: str = "REFLEC BEAT colette" version: int = VersionConstants.REFLEC_BEAT_COLETTE @@ -130,7 +129,7 @@ class ReflecBeatColette(ReflecBeatBase): 9: 0, } - for (eventid, phase) in events.items(): + for eventid, phase in events.items(): data = Node.void("data") event_ctrl.add_child(data) data.add_child(Node.s32("type", eventid)) @@ -168,7 +167,7 @@ class ReflecBeatColette(ReflecBeatBase): new = Node.void("new") base.add_child(new) - for (mid, plays) in hitchart: + for mid, plays in hitchart: d = Node.void("d") new.add_child(d) d.add_child(Node.s16("mid", mid)) @@ -247,7 +246,7 @@ class ReflecBeatColette(ReflecBeatBase): ) def add_comments(name: str, selected: List[Tuple[UserID, Achievement]]) -> None: - for (uid, ach) in selected: + for uid, ach in selected: cmnt = Node.void(name) root.add_child(cmnt) cmnt.add_child(Node.s32("uid", uid_mapping[uid].extid)) @@ -431,7 +430,7 @@ class ReflecBeatColette(ReflecBeatBase): userid = self.data.remote.user.from_extid(self.game, self.version, extid) if userid is not None: lobbies = self.data.local.lobby.get_all_lobbies(self.game, self.version) - for (user, lobby) in lobbies: + for user, lobby in lobbies: if limit <= 0: break diff --git a/bemani/backend/reflec/factory.py b/bemani/backend/reflec/factory.py index cc5292f..bd4a9f3 100644 --- a/bemani/backend/reflec/factory.py +++ b/bemani/backend/reflec/factory.py @@ -12,7 +12,6 @@ from bemani.data import Config, Data class ReflecBeatFactory(Factory): - MANAGED_CLASSES: List[Type[Base]] = [ ReflecBeat, ReflecBeatLimelight, diff --git a/bemani/backend/reflec/groovin.py b/bemani/backend/reflec/groovin.py index 486669f..bc76db5 100644 --- a/bemani/backend/reflec/groovin.py +++ b/bemani/backend/reflec/groovin.py @@ -10,7 +10,6 @@ from bemani.protocol import Node class ReflecBeatGroovin(ReflecBeatBase): - name: str = "REFLEC BEAT groovin'!!" version: int = VersionConstants.REFLEC_BEAT_GROOVIN @@ -203,7 +202,7 @@ class ReflecBeatGroovin(ReflecBeatBase): userid = self.data.remote.user.from_extid(self.game, self.version, extid) if userid is not None: lobbies = self.data.local.lobby.get_all_lobbies(self.game, self.version) - for (user, lobby) in lobbies: + for user, lobby in lobbies: if limit <= 0: break @@ -318,7 +317,7 @@ class ReflecBeatGroovin(ReflecBeatBase): profile for profile in all_profiles if profile[1].get_int("lid", -1) in lids ] - for (rootnode, timeoffset) in [ + for rootnode, timeoffset in [ (today, 0), (yesterday, Time.SECONDS_IN_DAY), ]: @@ -334,7 +333,7 @@ class ReflecBeatGroovin(ReflecBeatBase): # Calculate scores based on attempt scores_by_user: Dict[UserID, Dict[int, Dict[int, Attempt]]] = {} - for (userid, attempt) in relevant_attempts: + for userid, attempt in relevant_attempts: if userid not in scores_by_user: scores_by_user[userid] = {} if attempt.id not in scores_by_user[userid]: @@ -362,7 +361,7 @@ class ReflecBeatGroovin(ReflecBeatBase): ) # Output that day's earned points - for (userid, profile) in relevant_profiles: + for userid, profile in relevant_profiles: data = Node.void("data") rootnode.add_child(data) data.add_child( @@ -409,7 +408,7 @@ class ReflecBeatGroovin(ReflecBeatBase): new = Node.void("new") base.add_child(new) - for (mid, plays) in hitchart: + for mid, plays in hitchart: d = Node.void("d") new.add_child(d) d.add_child(Node.s16("mid", mid)) @@ -546,7 +545,7 @@ class ReflecBeatGroovin(ReflecBeatBase): ) def add_comments(name: str, selected: List[Tuple[UserID, Achievement]]) -> None: - for (uid, ach) in selected: + for uid, ach in selected: cmnt = Node.void(name) root.add_child(cmnt) cmnt.add_child(Node.s32("uid", uid_mapping[uid].extid)) diff --git a/bemani/backend/reflec/limelight.py b/bemani/backend/reflec/limelight.py index 5ebefe6..57845eb 100644 --- a/bemani/backend/reflec/limelight.py +++ b/bemani/backend/reflec/limelight.py @@ -10,7 +10,6 @@ from bemani.protocol import Node class ReflecBeatLimelight(ReflecBeatBase): - name: str = "REFLEC BEAT limelight" version: int = VersionConstants.REFLEC_BEAT_LIMELIGHT @@ -134,7 +133,7 @@ class ReflecBeatLimelight(ReflecBeatBase): def __add_event_info(self, request: Node) -> None: events: Dict[int, int] = {} - for (_eventid, _phase) in events.items(): + for _eventid, _phase in events.items(): data = Node.void("data") request.add_child(data) data.add_child(Node.s32("type", -1)) @@ -163,7 +162,7 @@ class ReflecBeatLimelight(ReflecBeatBase): hitchart = self.data.local.music.get_hit_chart(self.game, self.version, 10) rank = 1 - for (mid, _plays) in hitchart: + for mid, _plays in hitchart: record = Node.void("record") originals.add_child(record) record.add_child(Node.s16("id", mid)) @@ -211,7 +210,7 @@ class ReflecBeatLimelight(ReflecBeatBase): commentnode = Node.void("comment") root.add_child(commentnode) - for (uid, comment) in comments: + for uid, comment in comments: lid = ID.parse_machine_id(comment.data.get_str("lid")) # Look up external data for the request @@ -237,7 +236,7 @@ class ReflecBeatLimelight(ReflecBeatBase): c.add_child(Node.string("comment", comment.data.get_str("comment"))) c.add_child(Node.bool("is_tweet", comment.data.get_bool("tweet"))) - for (uid, status) in statuses: + for uid, status in statuses: lid = ID.parse_machine_id(status.get_str("lid")) # Look up external data for the request @@ -408,7 +407,7 @@ class ReflecBeatLimelight(ReflecBeatBase): userid = self.data.remote.user.from_extid(self.game, self.version, extid) if userid is not None: lobbies = self.data.local.lobby.get_all_lobbies(self.game, self.version) - for (user, lobby) in lobbies: + for user, lobby in lobbies: if limit <= 0: break diff --git a/bemani/backend/reflec/reflecbeat.py b/bemani/backend/reflec/reflecbeat.py index 6338fe3..173101f 100644 --- a/bemani/backend/reflec/reflecbeat.py +++ b/bemani/backend/reflec/reflecbeat.py @@ -9,7 +9,6 @@ from bemani.protocol import Node class ReflecBeat(ReflecBeatBase): - name: str = "REFLEC BEAT" version: int = VersionConstants.REFLEC_BEAT @@ -129,7 +128,7 @@ class ReflecBeat(ReflecBeatBase): def __add_event_info(self, request: Node) -> None: events: Dict[int, int] = {} - for (_eventid, _phase) in events.items(): + for _eventid, _phase in events.items(): data = Node.void("data") request.add_child(data) data.add_child(Node.s32("type", -1)) @@ -210,7 +209,7 @@ class ReflecBeat(ReflecBeatBase): userid = self.data.remote.user.from_extid(self.game, self.version, extid) if userid is not None: lobbies = self.data.local.lobby.get_all_lobbies(self.game, self.version) - for (user, lobby) in lobbies: + for user, lobby in lobbies: if limit <= 0: break diff --git a/bemani/backend/reflec/volzza.py b/bemani/backend/reflec/volzza.py index a79de8e..bc58d67 100644 --- a/bemani/backend/reflec/volzza.py +++ b/bemani/backend/reflec/volzza.py @@ -10,7 +10,6 @@ from bemani.protocol import Node class ReflecBeatVolzza(ReflecBeatVolzzaBase): - name: str = "REFLEC BEAT VOLZZA" version: int = VersionConstants.REFLEC_BEAT_VOLZZA @@ -168,7 +167,7 @@ class ReflecBeatVolzza(ReflecBeatVolzzaBase): scores_by_musicid[score.id] = [None, None, None, None] scores_by_musicid[score.id][score.chart] = score - for (mid, scores) in scores_by_musicid.items(): + for mid, scores in scores_by_musicid.items(): points = [ score.points << 32 if score is not None else 0 for score in scores diff --git a/bemani/backend/reflec/volzza2.py b/bemani/backend/reflec/volzza2.py index 2f37130..0977f82 100644 --- a/bemani/backend/reflec/volzza2.py +++ b/bemani/backend/reflec/volzza2.py @@ -10,7 +10,6 @@ from bemani.protocol import Node class ReflecBeatVolzza2(ReflecBeatVolzzaBase): - name: str = "REFLEC BEAT VOLZZA 2" version: int = VersionConstants.REFLEC_BEAT_VOLZZA_2 @@ -192,7 +191,7 @@ class ReflecBeatVolzza2(ReflecBeatVolzzaBase): scores_by_musicid[score.id] = [None, None, None, None] scores_by_musicid[score.id][score.chart] = score - for (mid, scores) in scores_by_musicid.items(): + for mid, scores in scores_by_musicid.items(): points = [ score.points << 32 if score is not None else 0 for score in scores diff --git a/bemani/backend/reflec/volzzabase.py b/bemani/backend/reflec/volzzabase.py index dd09e1d..b296751 100644 --- a/bemani/backend/reflec/volzzabase.py +++ b/bemani/backend/reflec/volzzabase.py @@ -9,7 +9,6 @@ from bemani.protocol import Node class ReflecBeatVolzzaBase(ReflecBeatBase): - # Clear types according to the game GAME_CLEAR_TYPE_NO_PLAY: Final[int] = 0 GAME_CLEAR_TYPE_EARLY_FAILED: Final[int] = 1 @@ -99,7 +98,7 @@ class ReflecBeatVolzzaBase(ReflecBeatBase): profile for profile in all_profiles if profile[1].get_int("lid", -1) in lids ] - for (rootnode, timeoffset) in [ + for rootnode, timeoffset in [ (today, 0), (yesterday, Time.SECONDS_IN_DAY), ]: @@ -115,7 +114,7 @@ class ReflecBeatVolzzaBase(ReflecBeatBase): # Calculate scores based on attempt scores_by_user: Dict[UserID, Dict[int, Dict[int, Attempt]]] = {} - for (userid, attempt) in relevant_attempts: + for userid, attempt in relevant_attempts: if userid not in scores_by_user: scores_by_user[userid] = {} if attempt.id not in scores_by_user[userid]: @@ -143,7 +142,7 @@ class ReflecBeatVolzzaBase(ReflecBeatBase): ) # Output that day's earned points - for (userid, profile) in relevant_profiles: + for userid, profile in relevant_profiles: data = Node.void("data") rootnode.add_child(data) data.add_child( @@ -187,7 +186,7 @@ class ReflecBeatVolzzaBase(ReflecBeatBase): new = Node.void("new") base.add_child(new) - for (mid, plays) in hitchart: + for mid, plays in hitchart: d = Node.void("d") new.add_child(d) d.add_child(Node.s16("mid", mid)) @@ -358,7 +357,7 @@ class ReflecBeatVolzzaBase(ReflecBeatBase): userid = self.data.remote.user.from_extid(self.game, self.version, extid) if userid is not None: lobbies = self.data.local.lobby.get_all_lobbies(self.game, self.version) - for (user, lobby) in lobbies: + for user, lobby in lobbies: if limit <= 0: break diff --git a/bemani/backend/sdvx/base.py b/bemani/backend/sdvx/base.py index 2d921ad..0eebed3 100644 --- a/bemani/backend/sdvx/base.py +++ b/bemani/backend/sdvx/base.py @@ -140,7 +140,7 @@ class SoundVoltexBase(CoreHandler, CardManagerHandler, PASELIHandler, Base): ] ) attempts: Dict[int, Dict[int, Dict[str, int]]] = {} - for (_, attempt) in all_attempts: + for _, attempt in all_attempts: # Terrible temporary structure is terrible. if attempt.id not in attempts: attempts[attempt.id] = {} diff --git a/bemani/backend/sdvx/booth.py b/bemani/backend/sdvx/booth.py index f953c44..34c561c 100644 --- a/bemani/backend/sdvx/booth.py +++ b/bemani/backend/sdvx/booth.py @@ -13,7 +13,6 @@ class SoundVoltexBooth( EventLogHandler, SoundVoltexBase, ): - name: str = "SOUND VOLTEX BOOTH" version: int = VersionConstants.SDVX_BOOTH diff --git a/bemani/backend/sdvx/factory.py b/bemani/backend/sdvx/factory.py index cafbe01..4c1bb2d 100644 --- a/bemani/backend/sdvx/factory.py +++ b/bemani/backend/sdvx/factory.py @@ -12,7 +12,6 @@ from bemani.data import Config, Data class SoundVoltexFactory(Factory): - MANAGED_CLASSES: List[Type[Base]] = [ SoundVoltexBooth, SoundVoltexInfiniteInfection, diff --git a/bemani/backend/sdvx/gravitywars.py b/bemani/backend/sdvx/gravitywars.py index 4a29a99..d80f1d2 100644 --- a/bemani/backend/sdvx/gravitywars.py +++ b/bemani/backend/sdvx/gravitywars.py @@ -13,7 +13,6 @@ class SoundVoltexGravityWars( EventLogHandler, SoundVoltexBase, ): - name: str = "SOUND VOLTEX III GRAVITY WARS" version: int = VersionConstants.SDVX_GRAVITY_WARS @@ -171,7 +170,7 @@ class SoundVoltexGravityWars( ): ids.add((song.id, song.chart)) - for (songid, chart) in ids: + for songid, chart in ids: info = Node.void("info") limited.add_child(info) info.add_child(Node.s32("music_id", songid)) diff --git a/bemani/backend/sdvx/gravitywars_s1.py b/bemani/backend/sdvx/gravitywars_s1.py index 0c5dc42..47f0e84 100644 --- a/bemani/backend/sdvx/gravitywars_s1.py +++ b/bemani/backend/sdvx/gravitywars_s1.py @@ -3054,7 +3054,7 @@ class SoundVoltexGravityWarsSeason1( hitchart = Node.void("hitchart") game.add_child(hitchart) - for (songid, count) in playcounts: + for songid, count in playcounts: info = Node.void("info") hitchart.add_child(info) info.add_child(Node.u32("id", songid)) @@ -3072,7 +3072,7 @@ class SoundVoltexGravityWarsSeason1( game.add_child(hiscore_allover) # Output records - for (userid, score) in records: + for userid, score in records: info = Node.void("info") if userid not in users: @@ -3100,14 +3100,14 @@ class SoundVoltexGravityWarsSeason1( self.game, self.version, userlist=area_users ) missing_users = [userid for (userid, _) in records if userid not in users] - for (userid, profile) in self.get_any_profiles(missing_users): + for userid, profile in self.get_any_profiles(missing_users): users[userid] = profile hiscore_location = Node.void("hiscore_location") game.add_child(hiscore_location) # Output records - for (userid, score) in records: + for userid, score in records: info = Node.void("info") if userid not in users: diff --git a/bemani/backend/sdvx/gravitywars_s2.py b/bemani/backend/sdvx/gravitywars_s2.py index 240b7a1..0492dfb 100644 --- a/bemani/backend/sdvx/gravitywars_s2.py +++ b/bemani/backend/sdvx/gravitywars_s2.py @@ -3842,7 +3842,7 @@ class SoundVoltexGravityWarsSeason2( hitchart = Node.void("hit") game.add_child(hitchart) - for (songid, count) in playcounts: + for songid, count in playcounts: info = Node.void("d") hitchart.add_child(info) info.add_child(Node.u32("id", songid)) @@ -3866,10 +3866,10 @@ class SoundVoltexGravityWarsSeason2( missing_users = [ userid for (userid, _) in global_records if userid not in users ] + [userid for (userid, _) in area_records if userid not in users] - for (userid, profile) in self.get_any_profiles(missing_users): + for userid, profile in self.get_any_profiles(missing_users): users[userid] = profile - for (userid, score) in global_records: + for userid, score in global_records: if userid not in users: raise Exception("Logic error, missing profile for user!") if score.id not in records: @@ -3878,7 +3878,7 @@ class SoundVoltexGravityWarsSeason2( records[score.id][score.chart] = {} records[score.id][score.chart]["global"] = (userid, score) - for (userid, score) in area_records: + for userid, score in area_records: if userid not in users: raise Exception("Logic error, missing profile for user!") if score.id not in records: diff --git a/bemani/backend/sdvx/heavenlyhaven.py b/bemani/backend/sdvx/heavenlyhaven.py index 50c98d6..842b5d4 100644 --- a/bemani/backend/sdvx/heavenlyhaven.py +++ b/bemani/backend/sdvx/heavenlyhaven.py @@ -14,7 +14,6 @@ class SoundVoltexHeavenlyHaven( EventLogHandler, SoundVoltexBase, ): - name: str = "SOUND VOLTEX IV HEAVENLY HAVEN" version: int = VersionConstants.SDVX_HEAVENLY_HAVEN @@ -3266,7 +3265,7 @@ class SoundVoltexHeavenlyHaven( ): ids.add((song.id, song.chart)) - for (songid, chart) in ids: + for songid, chart in ids: info = Node.void("info") limited.add_child(info) info.add_child(Node.s32("music_id", songid)) @@ -3478,10 +3477,10 @@ class SoundVoltexHeavenlyHaven( missing_users = [ userid for (userid, _) in global_records if userid not in users ] + [userid for (userid, _) in area_records if userid not in users] - for (userid, profile) in self.get_any_profiles(missing_users): + for userid, profile in self.get_any_profiles(missing_users): users[userid] = profile - for (userid, score) in global_records: + for userid, score in global_records: if userid not in users: raise Exception("Logic error, missing profile for user!") if score.id not in records: @@ -3490,7 +3489,7 @@ class SoundVoltexHeavenlyHaven( records[score.id][score.chart] = {} records[score.id][score.chart]["global"] = (userid, score) - for (userid, score) in area_records: + for userid, score in area_records: if userid not in users: raise Exception("Logic error, missing profile for user!") if score.id not in records: diff --git a/bemani/backend/sdvx/infiniteinfection.py b/bemani/backend/sdvx/infiniteinfection.py index 12630bc..da8f5e2 100644 --- a/bemani/backend/sdvx/infiniteinfection.py +++ b/bemani/backend/sdvx/infiniteinfection.py @@ -14,7 +14,6 @@ class SoundVoltexInfiniteInfection( EventLogHandler, SoundVoltexBase, ): - name: str = "SOUND VOLTEX II -infinite infection-" version: int = VersionConstants.SDVX_INFINITE_INFECTION @@ -1876,7 +1875,7 @@ class SoundVoltexInfiniteInfection( ): ids.add((song.id, song.chart)) - for (songid, chart) in ids: + for songid, chart in ids: info = Node.void("info") limited.add_child(info) info.add_child(Node.s32("music_id", songid)) @@ -1975,7 +1974,7 @@ class SoundVoltexInfiniteInfection( hitchart = Node.void("hitchart") game.add_child(hitchart) - for (songid, count) in playcounts: + for songid, count in playcounts: info = Node.void("info") hitchart.add_child(info) info.add_child(Node.u32("id", songid)) @@ -1993,7 +1992,7 @@ class SoundVoltexInfiniteInfection( game.add_child(hiscore_allover) # Output records - for (userid, score) in records: + for userid, score in records: info = Node.void("info") if userid not in users: @@ -2021,14 +2020,14 @@ class SoundVoltexInfiniteInfection( self.game, self.version, userlist=area_users ) missing_users = [userid for (userid, _) in records if userid not in users] - for (userid, profile) in self.get_any_profiles(missing_users): + for userid, profile in self.get_any_profiles(missing_users): users[userid] = profile hiscore_location = Node.void("hiscore_location") game.add_child(hiscore_location) # Output records - for (userid, score) in records: + for userid, score in records: info = Node.void("info") if userid not in users: diff --git a/bemani/client/reflec/limelight.py b/bemani/client/reflec/limelight.py index 24b3944..1ecbccc 100644 --- a/bemani/client/reflec/limelight.py +++ b/bemani/client/reflec/limelight.py @@ -380,7 +380,7 @@ class ReflecBeatLimelight(BaseClient): blog = Node.void("blog") pdata.add_child(blog) - for (_, record) in sortedrecords.items(): + for _, record in sortedrecords.items(): rec = Node.void("rec") recordnode.add_child(rec) rec.add_child(Node.u16("mid", record["id"])) diff --git a/bemani/client/reflec/reflec.py b/bemani/client/reflec/reflec.py index c710e63..e2a5fb3 100644 --- a/bemani/client/reflec/reflec.py +++ b/bemani/client/reflec/reflec.py @@ -261,7 +261,7 @@ class ReflecBeat(BaseClient): blog = Node.void("blog") pdata.add_child(blog) - for (_, record) in sortedrecords.items(): + for _, record in sortedrecords.items(): rec = Node.void("rec") recordnode.add_child(rec) rec.add_child(Node.u16("mid", record["id"])) diff --git a/bemani/data/api/music.py b/bemani/data/api/music.py index 5c284d2..903e4cf 100644 --- a/bemani/data/api/music.py +++ b/bemani/data/api/music.py @@ -725,7 +725,7 @@ class GlobalMusicData(BaseGlobalData): return allscores.get(userid, {}).get(songid, {}).get(songchart) # First, seed with local scores - for (userid, score) in localscores: + for userid, score in localscores: add_score(userid, score) # Second, merge in remote scorse @@ -830,7 +830,7 @@ class GlobalMusicData(BaseGlobalData): return allscores.get(songid, {}).get(songchart, (None, None)) # First, seed with local records - for (userid, score) in localscores: + for userid, score in localscores: add_score(userid, score) # Second, merge in remote records diff --git a/bemani/data/api/user.py b/bemani/data/api/user.py index 9c3ca14..8bbf09a 100644 --- a/bemani/data/api/user.py +++ b/bemani/data/api/user.py @@ -19,7 +19,6 @@ class GlobalUserData(BaseGlobalData): updates["area"] = area def __format_iidx_profile(self, updates: Profile, profile: Profile) -> None: - area = profile.get_int("area", -1) if area != -1: updates["pid"] = area diff --git a/bemani/data/mysql/base.py b/bemani/data/mysql/base.py index 51adcd2..756e7f0 100644 --- a/bemani/data/mysql/base.py +++ b/bemani/data/mysql/base.py @@ -38,7 +38,6 @@ class _BytesEncoder(json.JSONEncoder): class BaseData: - SESSION_LENGTH: Final[int] = 32 def __init__(self, config: Config, conn: Connection) -> None: diff --git a/bemani/data/mysql/machine.py b/bemani/data/mysql/machine.py index 229d9d7..b9c0d0c 100644 --- a/bemani/data/mysql/machine.py +++ b/bemani/data/mysql/machine.py @@ -83,7 +83,6 @@ class ArcadeCreationException(Exception): class MachineData(BaseData): - # This relies on the fact that arcadeid in the arcade_settings table is auto-increment # and thus will start at 1. DEFAULT_SETTINGS_ARCADE: Final[ArcadeID] = ArcadeID(-1) diff --git a/bemani/data/mysql/user.py b/bemani/data/mysql/user.py index 9f71c98..2c1373a 100644 --- a/bemani/data/mysql/user.py +++ b/bemani/data/mysql/user.py @@ -174,7 +174,6 @@ class AccountCreationException(Exception): class UserData(BaseData): - REF_ID_LENGTH: Final[int] = 16 def from_cardid(self, cardid: str) -> Optional[UserID]: diff --git a/bemani/format/afp/blend/perspective.py b/bemani/format/afp/blend/perspective.py index 27a668b..b0d099e 100644 --- a/bemani/format/afp/blend/perspective.py +++ b/bemani/format/afp/blend/perspective.py @@ -21,7 +21,7 @@ def perspective_calculate( uvz: Dict[Point, Point] = {} minz: Optional[float] = None maxz: Optional[float] = None - for (texx, texy) in [ + for texx, texy in [ (0, 0), (texwidth, 0), (0, texheight), diff --git a/bemani/format/afp/container.py b/bemani/format/afp/container.py index 10e2d32..808c0f8 100644 --- a/bemani/format/afp/container.py +++ b/bemani/format/afp/container.py @@ -1144,7 +1144,7 @@ class TXP2File(TrackedCoverage, VerboseOutput): tuples: List[Tuple[str, int]] = [(name, strings[name]) for name in strings] tuples = sorted(tuples, key=lambda tup: tup[1]) - for (string, offset) in tuples: + for string, offset in tuples: data = pad(data, offset) data += scramble_text(string, self.text_obfuscated) diff --git a/bemani/format/afp/swf.py b/bemani/format/afp/swf.py index ab0e637..f2fcaee 100644 --- a/bemani/format/afp/swf.py +++ b/bemani/format/afp/swf.py @@ -3302,7 +3302,6 @@ class SWF(VerboseOutput, TrackedCoverage): # This appears to be bytecode to execute on a per-frame basis. We execute this every frame and # only execute up to the point where we equal the current frame. if imported_tag_initializers_offset is not None: - unk1, length = struct.unpack( " Response: @adminrequired def viewmachines() -> Response: games: Dict[str, Dict[int, str]] = {} - for (game, version, name) in Base.all_games(): + for game, version, name in Base.all_games(): if game.value not in games: games[game.value] = {} games[game.value][version] = name diff --git a/bemani/frontend/bishi/bishi.py b/bemani/frontend/bishi/bishi.py index 8fd6003..e85a8f3 100644 --- a/bemani/frontend/bishi/bishi.py +++ b/bemani/frontend/bishi/bishi.py @@ -11,7 +11,6 @@ from bemani.frontend.base import FrontendBase class BishiBashiFrontend(FrontendBase): - game: GameConstants = GameConstants.BISHI_BASHI def __init__(self, data: Data, config: Config, cache: Cache) -> None: diff --git a/bemani/frontend/ddr/ddr.py b/bemani/frontend/ddr/ddr.py index a8c96b9..c2c05fb 100644 --- a/bemani/frontend/ddr/ddr.py +++ b/bemani/frontend/ddr/ddr.py @@ -9,7 +9,6 @@ from bemani.frontend.base import FrontendBase class DDRFrontend(FrontendBase): - game: GameConstants = GameConstants.DDR version: int = 0 # We use a virtual version for DDR to tie charts together diff --git a/bemani/frontend/ddr/endpoints.py b/bemani/frontend/ddr/endpoints.py index 6eda798..eb56bf1 100644 --- a/bemani/frontend/ddr/endpoints.py +++ b/bemani/frontend/ddr/endpoints.py @@ -517,7 +517,7 @@ def searchrivals() -> Dict[str, Any]: matches = set() profiles = g.data.remote.user.get_all_profiles(GameConstants.DDR, version) - for (userid, profile) in profiles: + for userid, profile in profiles: if profile.extid == extid or profile.get_str("name").lower() == name.lower(): matches.add(userid) diff --git a/bemani/frontend/gamesettings.py b/bemani/frontend/gamesettings.py index 3ded481..1bdbc90 100644 --- a/bemani/frontend/gamesettings.py +++ b/bemani/frontend/gamesettings.py @@ -10,14 +10,14 @@ def get_game_settings(data: Data, arcadeid: ArcadeID) -> List[Dict[str, Any]]: settings_lut: Dict[GameConstants, Dict[int, Dict[str, Any]]] = {} all_settings = [] - for (game, version, name) in Base.all_games(): + for game, version, name in Base.all_games(): if game not in game_lut: game_lut[game] = {} settings_lut[game] = {} game_lut[game][version] = name settings_lut[game][version] = {} - for (game, version, settings) in Base.all_settings(): + for game, version, settings in Base.all_settings(): if not settings: continue diff --git a/bemani/frontend/iidx/endpoints.py b/bemani/frontend/iidx/endpoints.py index df51565..02f576e 100644 --- a/bemani/frontend/iidx/endpoints.py +++ b/bemani/frontend/iidx/endpoints.py @@ -605,7 +605,7 @@ def searchrivals() -> Dict[str, Any]: matches = set() profiles = g.data.remote.user.get_all_profiles(GameConstants.IIDX, version) - for (userid, profile) in profiles: + for userid, profile in profiles: if profile.extid == extid or profile.get_str("name").lower() == djname.lower(): matches.add(userid) diff --git a/bemani/frontend/iidx/iidx.py b/bemani/frontend/iidx/iidx.py index e0881c9..f836e61 100644 --- a/bemani/frontend/iidx/iidx.py +++ b/bemani/frontend/iidx/iidx.py @@ -10,7 +10,6 @@ from bemani.frontend.base import FrontendBase class IIDXFrontend(FrontendBase): - game: GameConstants = GameConstants.IIDX valid_charts: List[int] = [ diff --git a/bemani/frontend/jubeat/endpoints.py b/bemani/frontend/jubeat/endpoints.py index 28de520..14c38be 100644 --- a/bemani/frontend/jubeat/endpoints.py +++ b/bemani/frontend/jubeat/endpoints.py @@ -491,7 +491,7 @@ def searchrivals() -> Dict[str, Any]: matches = set() profiles = g.data.remote.user.get_all_profiles(GameConstants.JUBEAT, version) - for (userid, profile) in profiles: + for userid, profile in profiles: if profile.extid == extid or profile.get_str("name").lower() == name.lower(): matches.add(userid) diff --git a/bemani/frontend/jubeat/jubeat.py b/bemani/frontend/jubeat/jubeat.py index 1cd0ff4..4b8a141 100644 --- a/bemani/frontend/jubeat/jubeat.py +++ b/bemani/frontend/jubeat/jubeat.py @@ -8,7 +8,6 @@ from bemani.frontend.base import FrontendBase class JubeatFrontend(FrontendBase): - game: GameConstants = GameConstants.JUBEAT valid_charts: List[int] = [ @@ -38,7 +37,7 @@ class JubeatFrontend(FrontendBase): VersionConstants.JUBEAT_FESTO: 9, } - for (game, version, name) in self.all_games(): + for game, version, name in self.all_games(): if version in mapping: yield (game, mapping[version], name) diff --git a/bemani/frontend/mga/mga.py b/bemani/frontend/mga/mga.py index 9e7cccf..c41b688 100644 --- a/bemani/frontend/mga/mga.py +++ b/bemani/frontend/mga/mga.py @@ -11,7 +11,6 @@ from bemani.frontend.base import FrontendBase class MetalGearArcadeFrontend(FrontendBase): - game: GameConstants = GameConstants.MGA def __init__(self, data: Data, config: Config, cache: Cache) -> None: diff --git a/bemani/frontend/museca/museca.py b/bemani/frontend/museca/museca.py index 39cdb9e..8fb3a02 100644 --- a/bemani/frontend/museca/museca.py +++ b/bemani/frontend/museca/museca.py @@ -16,7 +16,6 @@ from bemani.frontend.base import FrontendBase class MusecaFrontend(FrontendBase): - game: GameConstants = GameConstants.MUSECA valid_charts: List[int] = [ diff --git a/bemani/frontend/popn/endpoints.py b/bemani/frontend/popn/endpoints.py index 3ec68e9..e9e1bd1 100644 --- a/bemani/frontend/popn/endpoints.py +++ b/bemani/frontend/popn/endpoints.py @@ -426,7 +426,7 @@ def searchrivals() -> Dict[str, Any]: matches = set() profiles = g.data.remote.user.get_all_profiles(GameConstants.POPN_MUSIC, version) - for (userid, profile) in profiles: + for userid, profile in profiles: if profile.extid == extid or profile.get_str("name").lower() == name.lower(): matches.add(userid) diff --git a/bemani/frontend/popn/popn.py b/bemani/frontend/popn/popn.py index ee92e53..f19f76f 100644 --- a/bemani/frontend/popn/popn.py +++ b/bemani/frontend/popn/popn.py @@ -8,7 +8,6 @@ from bemani.frontend.base import FrontendBase class PopnMusicFrontend(FrontendBase): - game: GameConstants = GameConstants.POPN_MUSIC valid_charts: List[int] = [ diff --git a/bemani/frontend/reflec/endpoints.py b/bemani/frontend/reflec/endpoints.py index c2dce75..b7caa92 100644 --- a/bemani/frontend/reflec/endpoints.py +++ b/bemani/frontend/reflec/endpoints.py @@ -452,7 +452,7 @@ def searchrivals() -> Dict[str, Any]: matches = set() profiles = g.data.remote.user.get_all_profiles(GameConstants.REFLEC_BEAT, version) - for (userid, profile) in profiles: + for userid, profile in profiles: if profile.extid == extid or profile.get_str("name").lower() == name.lower(): matches.add(userid) diff --git a/bemani/frontend/reflec/reflec.py b/bemani/frontend/reflec/reflec.py index b6bc487..cb34b10 100644 --- a/bemani/frontend/reflec/reflec.py +++ b/bemani/frontend/reflec/reflec.py @@ -10,7 +10,6 @@ from bemani.frontend.base import FrontendBase class ReflecBeatFrontend(FrontendBase): - game: GameConstants = GameConstants.REFLEC_BEAT version: int = 0 # We use a virtual version for ReflecBeat to tie charts together diff --git a/bemani/frontend/sdvx/endpoints.py b/bemani/frontend/sdvx/endpoints.py index c11a2cd..24a3503 100644 --- a/bemani/frontend/sdvx/endpoints.py +++ b/bemani/frontend/sdvx/endpoints.py @@ -418,7 +418,7 @@ def searchrivals() -> Dict[str, Any]: matches = set() profiles = g.data.remote.user.get_all_profiles(GameConstants.SDVX, version) - for (userid, profile) in profiles: + for userid, profile in profiles: if profile.extid == extid or profile.get_str("name").lower() == name.lower(): matches.add(userid) diff --git a/bemani/frontend/sdvx/sdvx.py b/bemani/frontend/sdvx/sdvx.py index 2477248..bed50e2 100644 --- a/bemani/frontend/sdvx/sdvx.py +++ b/bemani/frontend/sdvx/sdvx.py @@ -10,7 +10,6 @@ from bemani.frontend.base import FrontendBase class SoundVoltexFrontend(FrontendBase): - game: GameConstants = GameConstants.SDVX valid_charts: List[int] = [ diff --git a/bemani/tests/test_protocol.py b/bemani/tests/test_protocol.py index 70cb7f4..8bf1c61 100644 --- a/bemani/tests/test_protocol.py +++ b/bemani/tests/test_protocol.py @@ -5,7 +5,6 @@ from bemani.protocol import EAmuseProtocol, Node class TestProtocol(unittest.TestCase): - # Define a function that just encrypts/decrypts and encode/decodes, verify # that we can get the same thing back. def assertLoopback(self, root: Node) -> None: diff --git a/bemani/utils/read.py b/bemani/utils/read.py index 2e350b5..191d277 100644 --- a/bemani/utils/read.py +++ b/bemani/utils/read.py @@ -1777,7 +1777,6 @@ class ImportJubeat(ImportBase): class ImportIIDX(ImportBase): - # Tutorial charts that shouldn't be on the UI BANNED_CHARTS = [ 16070, @@ -1837,7 +1836,7 @@ class ImportIIDX(ImportBase): def __gather_sound_files(self, directory: str) -> Dict[int, str]: files = {} - for (dirpath, dirnames, filenames) in os.walk(directory): + for dirpath, dirnames, filenames in os.walk(directory): for filename in filenames: songid, extension = os.path.splitext(filename) if extension == ".1" or extension == ".ifs":