From dbd2d8fe3f199d36505fa314044926b2da5d8f48 Mon Sep 17 00:00:00 2001 From: CookieCat Date: Mon, 25 Mar 2024 15:06:38 -0400 Subject: [PATCH] no unnecessary type hints --- worlds/ahit/DeathWishRules.py | 6 +++--- worlds/ahit/Items.py | 6 +++--- worlds/ahit/Locations.py | 2 +- worlds/ahit/Regions.py | 14 +++++++------- worlds/ahit/Rules.py | 8 ++++---- worlds/ahit/Types.py | 4 ++-- worlds/ahit/__init__.py | 2 +- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/worlds/ahit/DeathWishRules.py b/worlds/ahit/DeathWishRules.py index 1418af676b..2300166b5e 100644 --- a/worlds/ahit/DeathWishRules.py +++ b/worlds/ahit/DeathWishRules.py @@ -275,7 +275,7 @@ def get_total_dw_stamps(state: CollectionState, world: "HatInTimeWorld") -> int: if world.options.DWShuffle.value > 0: return 999 # no stamp costs in death wish shuffle - count: int = 0 + count = 0 for name in death_wishes: if name == "Snatcher Coins in Nyakuza Metro" and not world.is_dlc2(): @@ -332,7 +332,7 @@ def set_candle_dw_rules(name: str, world: "HatInTimeWorld"): def get_zero_jump_clear_count(state: CollectionState, world: "HatInTimeWorld") -> int: - total: int = 0 + total = 0 for name in act_chapters.keys(): n = f"{name} (Zero Jumps)" @@ -354,7 +354,7 @@ def get_zero_jump_clear_count(state: CollectionState, world: "HatInTimeWorld") - def get_reachable_enemy_count(state: CollectionState, world: "HatInTimeWorld") -> int: - count: int = 0 + count = 0 for enemy in hit_list.keys(): if enemy in bosses: continue diff --git a/worlds/ahit/Items.py b/worlds/ahit/Items.py index 5411aec68f..f05b3ba446 100644 --- a/worlds/ahit/Items.py +++ b/worlds/ahit/Items.py @@ -66,8 +66,8 @@ def create_itempool(world: "HatInTimeWorld") -> List[Item]: continue if name == "Time Piece": - tp_count: int = 40 - max_extra: int = 0 + tp_count = 40 + max_extra = 0 if world.is_dlc1(): max_extra += 6 @@ -94,7 +94,7 @@ def calculate_yarn_costs(world: "HatInTimeWorld"): min_yarn_cost = int(min(world.options.YarnCostMin.value, world.options.YarnCostMax.value)) max_yarn_cost = int(max(world.options.YarnCostMin.value, world.options.YarnCostMax.value)) - max_cost: int = 0 + max_cost = 0 for i in range(5): cost: int = mw.random.randint(min(min_yarn_cost, max_yarn_cost), max(max_yarn_cost, min_yarn_cost)) world.get_hat_yarn_costs()[HatType(i)] = cost diff --git a/worlds/ahit/Locations.py b/worlds/ahit/Locations.py index 9d148f64c0..cddd821698 100644 --- a/worlds/ahit/Locations.py +++ b/worlds/ahit/Locations.py @@ -9,7 +9,7 @@ TASKSANITY_START_ID = 2000300204 def get_total_locations(world: "HatInTimeWorld") -> int: - total: int = 0 + total = 0 if not world.is_dw_only(): for (name) in location_table.keys(): diff --git a/worlds/ahit/Regions.py b/worlds/ahit/Regions.py index 8772202b34..2b4ec06bae 100644 --- a/worlds/ahit/Regions.py +++ b/worlds/ahit/Regions.py @@ -574,7 +574,7 @@ def randomize_act_entrances(world: "HatInTimeWorld"): first_chapter: Region = get_first_chapter_region(world) has_guaranteed: bool = False - i: int = 0 + i = 0 while i < len(region_list): region = region_list[i] i += 1 @@ -780,8 +780,8 @@ def create_region(world: "HatInTimeWorld", name: str) -> Region: def create_badge_seller(world: "HatInTimeWorld") -> Region: badge_seller = Region("Badge Seller", world.player, world.multiworld) world.multiworld.regions.append(badge_seller) - count: int = 0 - max_items: int = 0 + count = 0 + max_items = 0 if world.options.BadgeSellerMaxItems.value > 0: max_items = world.random.randint(world.options.BadgeSellerMinItems.value, @@ -879,9 +879,9 @@ def get_shuffled_region(self, region: str) -> str: def create_thug_shops(world: "HatInTimeWorld"): min_items: int = min(world.options.NyakuzaThugMinShopItems.value, world.options.NyakuzaThugMaxShopItems.value) max_items: int = max(world.options.NyakuzaThugMaxShopItems.value, world.options.NyakuzaThugMinShopItems.value) - count: int = -1 - step: int = 0 - old_name: str = "" + count = -1 + step = 0 + old_name = "" thug_items = world.get_nyakuza_thug_items() for key, data in shop_locations.items(): @@ -919,7 +919,7 @@ def create_thug_shops(world: "HatInTimeWorld"): def create_events(world: "HatInTimeWorld") -> int: - count: int = 0 + count = 0 for (name, data) in event_locs.items(): if not is_location_valid(world, name): diff --git a/worlds/ahit/Rules.py b/worlds/ahit/Rules.py index b6c8d55efe..028b062224 100644 --- a/worlds/ahit/Rules.py +++ b/worlds/ahit/Rules.py @@ -42,7 +42,7 @@ def can_use_hat(state: CollectionState, world: "HatInTimeWorld", hat: HatType) - def get_hat_cost(world: "HatInTimeWorld", hat: HatType) -> int: - cost: int = 0 + cost = 0 costs = world.get_hat_yarn_costs() for h in world.get_hat_craft_order(): cost += costs[h] @@ -192,9 +192,9 @@ def set_rules(world: "HatInTimeWorld"): highest_cost: int = world.options.HighestChapterCost.value cost_increment: int = world.options.ChapterCostIncrement.value min_difference: int = world.options.ChapterCostMinDifference.value - last_cost: int = 0 - cost: int - loop_count: int = 0 + last_cost = 0 + cost = 0 + loop_count = 0 for chapter in chapter_list: min_range: int = lowest_cost + (cost_increment * loop_count) diff --git a/worlds/ahit/Types.py b/worlds/ahit/Types.py index 16255d7ec5..df0b910877 100644 --- a/worlds/ahit/Types.py +++ b/worlds/ahit/Types.py @@ -4,11 +4,11 @@ from BaseClasses import Location, Item, ItemClassification class HatInTimeLocation(Location): - game: str = "A Hat in Time" + game = "A Hat in Time" class HatInTimeItem(Item): - game: str = "A Hat in Time" + game = "A Hat in Time" class HatType(IntEnum): diff --git a/worlds/ahit/__init__.py b/worlds/ahit/__init__.py index e7775fae28..f4e2837ed7 100644 --- a/worlds/ahit/__init__.py +++ b/worlds/ahit/__init__.py @@ -207,7 +207,7 @@ class HatInTimeWorld(World): slot_data[name] = nyakuza_thug_items[self.player][name] if self.is_dw(): - i: int = 0 + i = 0 for name in excluded_dws[self.player]: if self.options.EndGoal.value == 3 and name == "Seal the Deal": continue