Skip to content

Commit cd5b663

Browse files
committed
Run black 23.1.0
1 parent a0f8f5c commit cd5b663

File tree

8 files changed

+0
-15
lines changed

8 files changed

+0
-15
lines changed

magicbot/magicrobot.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,6 @@ def _on_mode_disable_components(self) -> None:
576576
self.onException(forceReport=True)
577577

578578
def _create_components(self) -> None:
579-
580579
#
581580
# TODO: Will need to inject into any autonomous mode component
582581
# too, as they're a bit different

magicbot/state_machine.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ def timed_state(
184184
"""
185185

186186
def decorator(f: StateMethod) -> _State:
187-
188187
wrapper = _State(f, first, must_finish, duration=duration)
189188

190189
wrapper.next_state = next_state

robotpy_ext/autonomous/selector.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ def __init__(self, autonomous_pkgname, *args, **kwargs):
111111
modules.extend(glob(os.path.join(pkgdir, "*.py")))
112112

113113
for module_filename in modules:
114-
115114
module = None
116115
module_name = os.path.basename(module_filename[:-3])
117116

@@ -134,7 +133,6 @@ def __init__(self, autonomous_pkgname, *args, **kwargs):
134133
for name, obj in inspect.getmembers(module, inspect.isclass):
135134
mode_name = getattr(obj, "MODE_NAME", None)
136135
if mode_name is not None:
137-
138136
# don't allow the driver to select this mode
139137
if getattr(obj, "DISABLED", False):
140138
logger.warning(
@@ -145,7 +143,6 @@ def __init__(self, autonomous_pkgname, *args, **kwargs):
145143
try:
146144
instance = obj(*args, **kwargs)
147145
except:
148-
149146
if not wpilib.DriverStation.isFMSAttached():
150147
raise
151148
else:
@@ -178,7 +175,6 @@ def __init__(self, autonomous_pkgname, *args, **kwargs):
178175

179176
logger.info("Loaded autonomous modes:")
180177
for k, v in sorted(self.modes.items()):
181-
182178
if getattr(v, "DEFAULT", False):
183179
logger.info(" -> %s [Default]", k)
184180
self.chooser.setDefaultOption(k, v)

robotpy_ext/autonomous/selector_tests.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ def test_all_autonomous(control: PyfrcTestController):
1919
logger = logging.getLogger("test-all-autonomous")
2020

2121
with control.run_robot():
22-
2322
# Run disabled for a short period, chooser needs to be
2423
# initialized in robotInit
2524
control.step_timing(seconds=0.5, autonomous=True, enabled=False)
@@ -31,7 +30,6 @@ def test_all_autonomous(control: PyfrcTestController):
3130
return
3231

3332
for choice in choices:
34-
3533
chooser.setSelected(choice)
3634
logger.info(f"{'='*10} Testing '{choice}' {'='*10}")
3735

robotpy_ext/autonomous/stateful_autonomous.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ def register_sd_var(self, name, default, add_prefix=True, vmin=-1, vmax=1):
277277
self.__table.putStringArray(self.MODE_NAME + "_tunables", self.__tunables)
278278

279279
def __register_sd_var_internal(self, name, default, add_prefix, readback):
280-
281280
if " " in name:
282281
raise ValueError(
283282
"ERROR: Cannot use spaces in a tunable variable name (%s)" % name
@@ -310,7 +309,6 @@ def __register_sd_var_internal(self, name, default, add_prefix, readback):
310309
return is_number
311310

312311
def __build_states(self):
313-
314312
has_first = False
315313

316314
states = {}

tests/run_tests.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import subprocess
77

88
if __name__ == "__main__":
9-
109
root = abspath(dirname(__file__))
1110
os.chdir(root)
1211

tests/test_magicbot_sm.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ def timed_must_finish(self):
239239

240240
def test_autonomous_sm():
241241
class _TM(AutonomousStateMachine):
242-
243242
i = 0
244243
VERBOSE_LOGGING = False
245244

@@ -270,7 +269,6 @@ def something(self):
270269

271270
def test_autonomous_sm_end_timed_state(wpitime):
272271
class _TM(AutonomousStateMachine):
273-
274272
i = 0
275273
j = 0
276274
VERBOSE_LOGGING = False

tests/test_xl_max_sonar_ez.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
def test_digital_sensor(wpimock):
2-
32
wpimock.Counter().getPeriod.return_value = 1 * 0.000147
43

54
from robotpy_ext.common_drivers import xl_max_sonar_ez
@@ -9,7 +8,6 @@ def test_digital_sensor(wpimock):
98

109

1110
def test_analog_sensor(wpimock):
12-
1311
from robotpy_ext.common_drivers import xl_max_sonar_ez
1412

1513
analog = xl_max_sonar_ez.MaxSonarEZAnalog(1)

0 commit comments

Comments
 (0)