From 482f255f4c8bda23f132cadb1806ebf603ed8025 Mon Sep 17 00:00:00 2001 From: Till Skrodzki Date: Sun, 21 Jan 2024 08:09:44 +0100 Subject: [PATCH] Remove obsolete TODO notes --- mapadroid/db/DbPogoProtoSubmitRaw.py | 4 ---- .../data_processing/SerializedMitmDataProcessor.py | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/mapadroid/db/DbPogoProtoSubmitRaw.py b/mapadroid/db/DbPogoProtoSubmitRaw.py index f9444b95d..dd216418d 100644 --- a/mapadroid/db/DbPogoProtoSubmitRaw.py +++ b/mapadroid/db/DbPogoProtoSubmitRaw.py @@ -130,7 +130,6 @@ async def mons(self, session: AsyncSession, timestamp: float, mon.form = 0 else: mon.pokemon_id = mon_id - # TODO: Is "real" the correct reference here? mon.gender = mon_display.gender.real mon.costume = mon_display.costume.real mon.form = mon_display.form.real @@ -259,7 +258,6 @@ async def mon_iv(self, session: AsyncSession, timestamp: float, if wild_pokemon is None or wild_pokemon.encounter_id == 0 or not wild_pokemon.spawn_point_id: logger.warning("Encounter proto of no use (status: {}).", encounter_proto.status.real) return None - # TODO: Does it work without ".real"? encounter_id: int = wild_pokemon.encounter_id pokemon_data: pogoprotos.PokemonProto = wild_pokemon.pokemon mon_id: int = pokemon_data.id @@ -692,7 +690,6 @@ async def quest(self, session: AsyncSession, quest_proto: pogoprotos.FortSearchO reward_type: int = reward.type.real item_item: int = item.item.real item_amount: int = item.amount - # TODO: Check if .real can be used (i.e., if the ValueType can be None and would throw exception pokemon_id: Optional[int] = encounter.pokemon_id stardust: Optional[int] = reward.stardust @@ -775,7 +772,6 @@ async def gyms(self, session: AsyncSession, map_proto: pogoprotos.GetMapObjectsO cache_key = "gym{}{}{}".format(gymid, last_modified_ts, gameplay_weather) if await self._cache.exists(cache_key): continue - # TODO: Check if this works or .real needed guard_pokemon_id: int = gym.guard_pokemon_id team_id: int = gym.team diff --git a/mapadroid/mitm_receiver/data_processing/SerializedMitmDataProcessor.py b/mapadroid/mitm_receiver/data_processing/SerializedMitmDataProcessor.py index f0782e10a..03f6835b7 100644 --- a/mapadroid/mitm_receiver/data_processing/SerializedMitmDataProcessor.py +++ b/mapadroid/mitm_receiver/data_processing/SerializedMitmDataProcessor.py @@ -82,6 +82,7 @@ async def run(self): logger.debug("MITM data processor {} finished queue item in {}ms", self.__name, end_time) except KeyboardInterrupt: logger.info("Received keyboard interrupt, stopping MITM data processor") + return async def _process_data_raw(self, received_timestamp: int, data: Dict, origin: str): method_id: Optional[int] = data.get("type", None)