The Witness: mypy compliance (#3112)

* Make witness apworld mostly pass mypy

* Fix all remaining mypy errors except the core ones

* I'm a goofy stupid poopoo head

* Two more fixes

* ruff after merge

* Mypy for new stuff

* Oops

* Stricter ruff rules (that I already comply with :3)

* Deprecated ruff thing

* wait no i lied

* lol super nevermind

* I can actually be slightly more specific

* lint
This commit is contained in:
NewSoupVi
2024-07-02 23:59:26 +02:00
committed by GitHub
parent b6925c593e
commit 93617fa546
12 changed files with 299 additions and 269 deletions

View File

@@ -61,9 +61,7 @@ class WitnessPlayerLocations:
sorted(self.CHECK_PANELHEX_TO_ID.items(), key=lambda item: item[1])
)
event_locations = {
p for p in player_logic.USED_EVENT_NAMES_BY_HEX
}
event_locations = set(player_logic.USED_EVENT_NAMES_BY_HEX)
self.EVENT_LOCATION_TABLE = {
static_witness_locations.get_event_name(entity_hex): None
@@ -80,5 +78,5 @@ class WitnessPlayerLocations:
def add_location_late(self, entity_name: str) -> None:
entity_hex = static_witness_logic.ENTITIES_BY_NAME[entity_name]["entity_hex"]
self.CHECK_LOCATION_TABLE[entity_hex] = entity_name
self.CHECK_LOCATION_TABLE[entity_hex] = static_witness_locations.get_id(entity_hex)
self.CHECK_PANELHEX_TO_ID[entity_hex] = static_witness_locations.get_id(entity_hex)