Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Jul 1, 2024
1 parent 152e7cb commit 55c2b8d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion spalloc_client/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
import os.path
from typing import Any, Dict, List, Optional

import appdirs # type: ignore[import]
import appdirs

# The application name to use in config file names
_name = "spalloc"
Expand Down
11 changes: 5 additions & 6 deletions spalloc_client/scripts/machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
from typing import Any, Callable, cast, Dict, List

from spinn_utilities.overrides import overrides
from spinn_utilities.typing.json import JsonObjectArray, JsonValue

from spinn_utilities.typing.json import JsonObjectArray

from spalloc_client import __version__, ProtocolClient
from spalloc_client.term import (
Expand Down Expand Up @@ -90,8 +89,8 @@ def list_machines(t: Terminal, machines: JsonObjectArray,
for machine in machines:
name = cast(str, machine["name"])
boards = (((cast(int, machine["width"])) *
cast(int, machine["height"]) * 3) -
len(cast(list, machine["dead_boards"])))
cast(int, machine["height"]) * 3) -
len(cast(list, machine["dead_boards"])))
in_use = sum(len(cast(list, job["boards"]))
for job in cast(dict, machine_jobs[machine["name"]]))
the_jobs = len(machine_jobs[machine["name"]])
Expand All @@ -110,8 +109,8 @@ def _get_machine(machines, machine_name):
raise Terminate(6, f"No machine '{machine_name}' was found")


def show_machine(t:Terminal, machines: JsonObjectArray, jobs: JsonObjectArray,
machine_name: str, compact: bool=False):
def show_machine(t: Terminal, machines: JsonObjectArray, jobs: JsonObjectArray,
machine_name: str, compact: bool = False):
""" Display a more detailed overview of an individual machine.
Parameters
Expand Down
2 changes: 1 addition & 1 deletion spalloc_client/scripts/ps.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ def recurring(self, client: ProtocolClient, args: argparse.Namespace):
print("")



@overrides(Script.body)
def body(self, client: ProtocolClient, args: argparse.Namespace):
if args.watch:
Expand All @@ -179,6 +178,7 @@ def body(self, client: ProtocolClient, args: argparse.Namespace):
def verify_arguments(self, args: argparse.Namespace):
pass


main = ProcessListScript()
if __name__ == "__main__": # pragma: no cover
sys.exit(main())

0 comments on commit 55c2b8d

Please sign in to comment.