Skip to content

Commit

Permalink
fix typing on 3.8 (ArchipelagoMW#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
qwint committed Aug 17, 2024
1 parent 40effe7 commit ac27f43
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions worlds/tracker/TrackerClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ class TrackerGameContext(CommonContext):
command_processor = TrackerCommandProcessor
tracker_page = None
watcher_task = None
update_callback: Callable[[list[str]], bool] = None
region_callback: Callable[[list[str]], bool] = None
events_callback: Callable[[list[str]], bool] = None
update_callback: "Callable[[List[str]], bool]" = None
region_callback: "Callable[[List[str]], bool]" = None
events_callback: "Callable[[List[str]], bool]" = None
gen_error = None
output_format = "Both"
hide_excluded = False
Expand Down Expand Up @@ -119,13 +119,13 @@ def log_to_tab(self, line: str, sort: bool = False):
if self.tracker_page is not None:
self.tracker_page.addLine(line, sort)

def set_callback(self, func: Optional[Callable[[list[str]], bool]] = None):
def set_callback(self, func: "Optional[Callable[[List[str]], bool]]" = None):
self.update_callback = func

def set_region_callback(self, func: Optional[Callable[[list[str]], bool]] = None):
def set_region_callback(self, func: "Optional[Callable[[List[str]], bool]]" = None):
self.region_callback = func

def set_events_callback(self, func: Optional[Callable[[list[str]], bool]] = None):
def set_events_callback(self, func: "Optional[Callable[[List[str]], bool]]" = None):
self.events_callback = func

def build_gui(self, manager: "GameManager"):
Expand Down Expand Up @@ -524,7 +524,7 @@ def updateTracker(ctx: TrackerGameContext):
regions = []
locations = []
for temp_loc in ctx.multiworld.get_reachable_locations(state, ctx.player_id):
if temp_loc.address == None or isinstance(temp_loc.address, list):
if temp_loc.address == None or isinstance(temp_loc.address, List):
continue
elif ctx.hide_excluded and temp_loc.progress_type == LocationProgressType.EXCLUDED:
continue
Expand Down

0 comments on commit ac27f43

Please sign in to comment.