Skip to content

Commit

Permalink
ACTUALLY fix the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
C0rn3j committed Sep 17, 2024
1 parent 01368bf commit d92032e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scc/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from scc.constants import SCButtons, BASE_STICK_MOUSE_SPEED
from scc.aliases import ALL_BUTTONS as GAMEPAD_BUTTONS
from math import copysign, sqrt, sin, cos, atan2, pi as PI
from enum import IntEnum

import sys
import logging
Expand Down Expand Up @@ -214,8 +215,8 @@ def describe(self, context):

def to_string(self, multiline=False, pad=0):
"""Convert action back to string."""
return (" " * pad) + "%s(%s)" % (self.COMMAND, ", ".join([
x.to_string() if isinstance(x, Action) else f"{x.__class__.__name__}.{x.name}"
return (" " * pad) + "{}({})".format(self.COMMAND, ", ".join([
x.to_string() if isinstance(x, Action) else f"{x.__class__.__name__}.{x.name}" if isinstance(x, IntEnum) else str(x)
for x in self.parameters
]))

Expand Down

0 comments on commit d92032e

Please sign in to comment.