[robotpy] Run black on robotpy files (#9017)

This piggy-backs off #8362. `wpiformat` will handle all the non-python
files (C++ trailing spaces in yaml files, etc), and the robotpy files
(guarded by being under src/main/python or src/test/python) will be
handled by black only.
This commit is contained in:
PJ Reiniger
2026-06-27 15:13:13 -04:00
committed by GitHub
parent a5d66fb4ff
commit fd25e8666f
5 changed files with 47 additions and 12 deletions

View File

@@ -3,7 +3,6 @@ import pytest
from wpilib import DriverStation, DriverStationBackend, GenericHID
from wpilib.simulation import DriverStationSim, GenericHIDSim
RumbleType = GenericHID.RumbleType
RUMBLE_TYPES = (
RumbleType.LEFT_RUMBLE,
@@ -30,9 +29,7 @@ def test_rumble_range() -> None:
for rumble_type in RUMBLE_TYPES:
hid.setRumble(rumble_type, rumble_value)
assert sim.getRumble(rumble_type) == pytest.approx(
rumble_value, abs=0.0001
)
assert sim.getRumble(rumble_type) == pytest.approx(rumble_value, abs=0.0001)
def test_rumble_types() -> None:
@@ -50,9 +47,7 @@ def test_rumble_types() -> None:
for rumble_type in RUMBLE_TYPES:
expected = 1 if rumble_type == active_rumble_type else 0
assert sim.getRumble(rumble_type) == pytest.approx(
expected, abs=0.0001
)
assert sim.getRumble(rumble_type) == pytest.approx(expected, abs=0.0001)
hid.setRumble(active_rumble_type, 0)