Skip to content

Commit d031b96

Browse files
author
Alan Christie
committed
fix: Option arrays
Use of decoder 1.11.5
1 parent 1c06f93 commit d031b96

File tree

3 files changed

+15
-19
lines changed

3 files changed

+15
-19
lines changed

.pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ disable = import-error,
99
too-many-locals,
1010
too-many-branches,
1111
too-many-instance-attributes,
12+
too-many-nested-blocks,
1213
too-many-statements

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
docker-compose == 1.29.2
2-
im-data-manager-job-decoder == 1.11.4
2+
im-data-manager-job-decoder == 1.11.5
33
munch == 2.5.0
44
pyyaml == 5.4.1
55
yamllint == 1.26.3

src/jote/jote.py

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -518,26 +518,21 @@ def _test(
518518
# Record but do no further processing
519519
tests_failed += 1
520520
test_status = False
521-
# Is it declared as a list?
522-
value_is_list: bool = False
523-
if variable_is_option:
524-
if job_definition.variables.options.properties[variable].multiple:
525-
value_is_list = True
526-
else:
521+
522+
if variable_is_input:
523+
# Is it an input (not an option).
524+
# The input is a list if it's declared as 'multiple'
527525
if job_definition.variables.inputs.properties[variable].multiple:
528-
value_is_list = True
529-
530-
# Add each value or just one value
531-
# (depending on whether it's a list)
532-
if value_is_list:
533-
job_variables[variable] = []
534-
for value in job_definition.tests[job_test_name].inputs[variable]:
535-
job_variables[variable].append(os.path.basename(value))
526+
job_variables[variable] = []
527+
for value in job_definition.tests[job_test_name].inputs[
528+
variable
529+
]:
530+
job_variables[variable].append(os.path.basename(value))
531+
input_files.append(value)
532+
else:
533+
value = job_definition.tests[job_test_name].inputs[variable]
534+
job_variables[variable] = os.path.basename(value)
536535
input_files.append(value)
537-
else:
538-
value = job_definition.tests[job_test_name].inputs[variable]
539-
job_variables[variable] = os.path.basename(value)
540-
input_files.append(value)
541536

542537
decoded_command: str = ""
543538
test_environment: Dict[str, str] = {}

0 commit comments

Comments
 (0)