Skip to content

Commit

Permalink
update format
Browse files Browse the repository at this point in the history
  • Loading branch information
t-sasatani committed Nov 1, 2024
1 parent 6dcd57a commit 97a57a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions miniscope_io/cli/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@ def update(port: str, target: str, value: int, device_id: int, restart: bool) ->
if target and value:
DevUpdate(port=port, target=target, value=value, device_id=device_id)
elif restart:
DevUpdate(port=port,
target="DEVICE",
value=DeviceCommand.RESTART.value,
device_id=device_id)
DevUpdate(
port=port, target="DEVICE", value=DeviceCommand.RESTART.value, device_id=device_id
)
else:
raise click.UsageError("Either --target with --value or --restart must be specified.")
2 changes: 1 addition & 1 deletion tests/test_models/test_model_devupdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ def test_invalid_port():

def test_device_command(mock_serial_ports):
cmd = DevUpdateCommand(device_id=1, port="COM2", target="DEVICE", value=DeviceCommand.RESTART.value)
assert cmd.value == int(DeviceCommand.RESTART.value)
assert cmd.value == DeviceCommand.RESTART.value

0 comments on commit 97a57a2

Please sign in to comment.