Skip to content

Commit

Permalink
tighter typing
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Nov 26, 2024
1 parent 858bc86 commit 401bfc3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion spalloc_client/scripts/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def get_job_id(self, client: ProtocolClient,
return cast(int, job_ids[0])

@overrides(Script.get_parser)
def get_parser(self, cfg: Dict[str, Any]) -> argparse.ArgumentParser:
def get_parser(self, cfg: Dict[str, str]) -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(
description="Manage running jobs.")
parser.add_argument(
Expand Down
2 changes: 1 addition & 1 deletion spalloc_client/scripts/machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def get_and_display_machine_info(
show_machine(t, machines, jobs, args.machine, not args.detailed)

@overrides(Script.get_parser)
def get_parser(self, cfg: Dict[str, Any]) -> argparse.ArgumentParser:
def get_parser(self, cfg: Dict[str, str]) -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(
description="Get the state of individual machines.")
parser.add_argument(
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 @@ -128,7 +128,7 @@ class ProcessListScript(Script):
An object form Job scripts.
"""
@overrides(Script.get_parser)
def get_parser(self, cfg: Dict[str, Any]) -> argparse.ArgumentParser:
def get_parser(self, cfg: Dict[str, str]) -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(description="List all active jobs.")
parser.add_argument(
"--version", "-V", action="version", version=__version__)
Expand Down
2 changes: 1 addition & 1 deletion spalloc_client/scripts/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Script(object, metaclass=AbstractBase):
def __init__(self) -> None:
self.client_factory = ProtocolClient

def get_parser(self, cfg: Dict[str, Any]) -> ArgumentParser:
def get_parser(self, cfg: Dict[str, str]) -> ArgumentParser:
""" Return a set-up instance of :py:class:`argparse.ArgumentParser`
"""
raise NotImplementedError
Expand Down
2 changes: 1 addition & 1 deletion spalloc_client/scripts/where_is.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def __init__(self) -> None:
self.show_board_chip = False

@overrides(Script.get_parser)
def get_parser(self, cfg: Dict[str, Any]) -> argparse.ArgumentParser:
def get_parser(self, cfg: Dict[str, str]) -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(
description="Find out the location (physical or logical) of a "
"chip or board.")
Expand Down

0 comments on commit 401bfc3

Please sign in to comment.