Skip to content

Commit 9e18849

Browse files
committed
linting fixes
1 parent 705041e commit 9e18849

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/hpcc_remote/submit.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ def __init__(
3636
output: str | None = None,
3737
error: str | None = None,
3838
) -> None:
39-
sh = shutil.which("sh")
4039
ssh = shutil.which("ssh")
41-
if sh is None:
40+
if ssh is None:
4241
raise RuntimeError("ssh not found on PATH")
4342
stdout = streamify(output)
4443
if stdout is not None:
@@ -108,7 +107,6 @@ def polling_frequency(self) -> float:
108107
def submit(
109108
self,
110109
name: str,
111-
host: str,
112110
args: list[str],
113111
scriptname: str | None = None,
114112
qtime: float | None = None,
@@ -121,6 +119,9 @@ def submit(
121119
gpus: int | None = None,
122120
**kwargs: Any,
123121
) -> HPCProcess:
122+
host = kwargs.get("host")
123+
if host is None:
124+
raise ValueError("missing required kwarg 'host'")
124125
cpus = cpus or kwargs.get("tasks") # backward compatible
125126
script = self.write_submission_script(
126127
name,

tests/pbs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ def test_basic():
4444
assert "#PBS -l walltime=00:00:01" in text
4545
assert "#PBS -o my-out.txt" in text
4646
assert "#PBS -e my-err.txt" in text
47-
assert "export MY_VAR=SPAM" in text
47+
assert 'export MY_VAR="SPAM"' in text
4848
assert "printenv || true" in text
4949
assert "ls" in text

tests/slurm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def test_basic():
4444
assert "#SBATCH --job-name=my-job" in text
4545
assert "#SBATCH --error=my-err.txt" in text
4646
assert "#SBATCH --output=my-out.txt" in text
47-
assert "export MY_VAR=SPAM" in text
47+
assert 'export MY_VAR="SPAM"' in text
4848
assert "printenv || true" in text
4949
assert "ls" in text
5050

0 commit comments

Comments
 (0)