Skip to content

Commit c764977

Browse files
STY: Clearer rewrite
Co-authored-by: Chris Markiewicz <[email protected]>
1 parent f141d5f commit c764977

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

niworkflows/reports/core.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,10 +462,7 @@ def _process_orderings(orderings, layout):
462462
{value[idx] for value in all_value_combos} for idx in range(len(orderings))
463463
]
464464
# if all values are None for an entity, we do not want to keep that entity
465-
keep_idx = [
466-
not ((len(val_set) == 1 and None in val_set) or not val_set)
467-
for val_set in unique_values
468-
]
465+
keep_idx = [val_set not in (set(), {None}) for val_set in unique_values]
469466
# the "kept" entities
470467
entities = list(compress(orderings, keep_idx))
471468
# the "kept" value combinations

0 commit comments

Comments
 (0)