|
7 | 7 | from datetime import timedelta |
8 | 8 | from pathlib import Path |
9 | 9 | from threading import Thread, RLock |
10 | | -from typing import Optional, List, Dict, Collection, cast, TextIO, Union |
| 10 | +from typing import Optional, List, Dict, Collection, cast, Union, IO |
11 | 11 |
|
12 | 12 | from .escape_functions import bash_escape |
13 | 13 | from psij.launchers.script_based_launcher import ScriptBasedLauncher |
@@ -38,6 +38,8 @@ def _attrs_to_mustache(job: Job) -> Dict[str, Union[object, List[Dict[str, objec |
38 | 38 | for k, v in job.spec.attributes._custom_attributes.items(): |
39 | 39 | ks = k.split('.', maxsplit=1) |
40 | 40 | if len(ks) == 2: |
| 41 | + # always use lower case here |
| 42 | + ks[0] = ks[0].lower() |
41 | 43 | if ks[0] not in r: |
42 | 44 | r[ks[0]] = [] |
43 | 45 | cast(List[Dict[str, object]], r[ks[0]]).append({'key': ks[1], 'value': v}) |
@@ -272,7 +274,7 @@ def attach(self, job: Job, native_id: str) -> None: |
272 | 274 |
|
273 | 275 | @abstractmethod |
274 | 276 | def generate_submit_script(self, job: Job, context: Dict[str, object], |
275 | | - submit_file: TextIO) -> None: |
| 277 | + submit_file: IO[str]) -> None: |
276 | 278 | """Called to generate a submit script for a job. |
277 | 279 |
|
278 | 280 | Concrete implementations of batch scheduler executors must override this method in |
|
0 commit comments