Skip to content

Commit

Permalink
Rename KeyError messages
Browse files Browse the repository at this point in the history
  • Loading branch information
dyceron committed Dec 24, 2024
1 parent a201cd7 commit 8f523e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mercury_engine_data_structures/formats/bmtun.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def construct_class(cls, target_game: Game) -> Construct:
def _check_tunable_exists(self, class_name: str, tunable_name: str) -> None:
classes = self.raw.classes
if class_name not in classes:
raise KeyError(f"Unknown tunable: {class_name}!")
raise KeyError(f"Unknown class name: {class_name}!")

Check warning on line 55 in src/mercury_engine_data_structures/formats/bmtun.py

View check run for this annotation

Codecov / codecov/patch

src/mercury_engine_data_structures/formats/bmtun.py#L55

Added line #L55 was not covered by tests
if tunable_name not in classes[class_name].tunables:
raise KeyError(f"Unknown tunable param: {tunable_name}!")
raise KeyError(f"Unknown tunable name: {tunable_name}!")

Tunable = str | float | bool | int | list[float]

Expand Down

0 comments on commit 8f523e0

Please sign in to comment.