Skip to content

Commit

Permalink
change how the args get handled to fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
alwaysintreble committed Jul 29, 2024
1 parent f3e3f33 commit 6933cb9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Fill.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@


class FillError(RuntimeError):
def __init__(self, *args, **kwargs) -> None:
if kwargs["multiworld"]:
placements = f"\nAll Placements:\n{[(loc, loc.item) for loc in kwargs['multiworld'].get_filled_locations()]}"
args = (*args, placements)
def __init__(self, *args: typing.Union[str, typing.Any], **kwargs) -> None:
if "multiworld" in kwargs and isinstance(args[0], str):
placements = (args[0] + f"\nAll Placements:\n" +
f"{[(loc, loc.item) for loc in kwargs['multiworld'].get_filled_locations()]}")
args = (placements, *args[1:])
super().__init__(*args)


Expand Down

0 comments on commit 6933cb9

Please sign in to comment.