Skip to content

Commit

Permalink
mypy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rowleya committed Jul 23, 2024
1 parent 7965f95 commit 856dfc4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions spinnman/spalloc/spalloc_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ def get_job(self, job_id: str) -> SpallocJob:
:param str job_id: The job id.
:rtype: SpallocJob
"""
assert self.__session
return _SpallocJob(
self.__session, fix_url(f"{self.__jobs_url}/{job_id}"))

Expand Down
4 changes: 2 additions & 2 deletions spinnman/utilities/locate_connected_machine_ip_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from spinnman.connections.udp_packet_connections import IPAddressesConnection


def locate_connected_machine(handler: Callable[[str, float], None]):
def locate_connected_machine(handler: Callable[[str, float], bool]):
"""
Locates any SpiNNaker machines IP addresses from the auto-transmitted
packets from non-booted SpiNNaker machines.
Expand Down Expand Up @@ -51,7 +51,7 @@ def _ctrlc_handler(sig, frame):
print("Exiting")
sys.exit()

def _print_connected(ip_address: str, timestamp: float):
def _print_connected(ip_address: str, timestamp: float) -> bool:
try:
hostname = f" ({socket.gethostbyaddr(ip_address)[0]})"
except Exception: # pylint: disable=broad-except
Expand Down

0 comments on commit 856dfc4

Please sign in to comment.