Skip to content

Commit

Permalink
Run black 23.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
auscompgeek committed Feb 1, 2023
1 parent a0f8f5c commit cd5b663
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion magicbot/magicrobot.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,6 @@ def _on_mode_disable_components(self) -> None:
self.onException(forceReport=True)

def _create_components(self) -> None:

#
# TODO: Will need to inject into any autonomous mode component
# too, as they're a bit different
Expand Down
1 change: 0 additions & 1 deletion magicbot/state_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ def timed_state(
"""

def decorator(f: StateMethod) -> _State:

wrapper = _State(f, first, must_finish, duration=duration)

wrapper.next_state = next_state
Expand Down
4 changes: 0 additions & 4 deletions robotpy_ext/autonomous/selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ def __init__(self, autonomous_pkgname, *args, **kwargs):
modules.extend(glob(os.path.join(pkgdir, "*.py")))

for module_filename in modules:

module = None
module_name = os.path.basename(module_filename[:-3])

Expand All @@ -134,7 +133,6 @@ def __init__(self, autonomous_pkgname, *args, **kwargs):
for name, obj in inspect.getmembers(module, inspect.isclass):
mode_name = getattr(obj, "MODE_NAME", None)
if mode_name is not None:

# don't allow the driver to select this mode
if getattr(obj, "DISABLED", False):
logger.warning(
Expand All @@ -145,7 +143,6 @@ def __init__(self, autonomous_pkgname, *args, **kwargs):
try:
instance = obj(*args, **kwargs)
except:

if not wpilib.DriverStation.isFMSAttached():
raise
else:
Expand Down Expand Up @@ -178,7 +175,6 @@ def __init__(self, autonomous_pkgname, *args, **kwargs):

logger.info("Loaded autonomous modes:")
for k, v in sorted(self.modes.items()):

if getattr(v, "DEFAULT", False):
logger.info(" -> %s [Default]", k)
self.chooser.setDefaultOption(k, v)
Expand Down
2 changes: 0 additions & 2 deletions robotpy_ext/autonomous/selector_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def test_all_autonomous(control: PyfrcTestController):
logger = logging.getLogger("test-all-autonomous")

with control.run_robot():

# Run disabled for a short period, chooser needs to be
# initialized in robotInit
control.step_timing(seconds=0.5, autonomous=True, enabled=False)
Expand All @@ -31,7 +30,6 @@ def test_all_autonomous(control: PyfrcTestController):
return

for choice in choices:

chooser.setSelected(choice)
logger.info(f"{'='*10} Testing '{choice}' {'='*10}")

Expand Down
2 changes: 0 additions & 2 deletions robotpy_ext/autonomous/stateful_autonomous.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ def register_sd_var(self, name, default, add_prefix=True, vmin=-1, vmax=1):
self.__table.putStringArray(self.MODE_NAME + "_tunables", self.__tunables)

def __register_sd_var_internal(self, name, default, add_prefix, readback):

if " " in name:
raise ValueError(
"ERROR: Cannot use spaces in a tunable variable name (%s)" % name
Expand Down Expand Up @@ -310,7 +309,6 @@ def __register_sd_var_internal(self, name, default, add_prefix, readback):
return is_number

def __build_states(self):

has_first = False

states = {}
Expand Down
1 change: 0 additions & 1 deletion tests/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import subprocess

if __name__ == "__main__":

root = abspath(dirname(__file__))
os.chdir(root)

Expand Down
2 changes: 0 additions & 2 deletions tests/test_magicbot_sm.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ def timed_must_finish(self):

def test_autonomous_sm():
class _TM(AutonomousStateMachine):

i = 0
VERBOSE_LOGGING = False

Expand Down Expand Up @@ -270,7 +269,6 @@ def something(self):

def test_autonomous_sm_end_timed_state(wpitime):
class _TM(AutonomousStateMachine):

i = 0
j = 0
VERBOSE_LOGGING = False
Expand Down
2 changes: 0 additions & 2 deletions tests/test_xl_max_sonar_ez.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
def test_digital_sensor(wpimock):

wpimock.Counter().getPeriod.return_value = 1 * 0.000147

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


def test_analog_sensor(wpimock):

from robotpy_ext.common_drivers import xl_max_sonar_ez

analog = xl_max_sonar_ez.MaxSonarEZAnalog(1)
Expand Down

0 comments on commit cd5b663

Please sign in to comment.