Skip to content

Commit 03c57b2

Browse files
STY: Apply ruff rule RUF021
RUF021 Parenthesize `a and b` expressions when chaining `and` and `or` together, to make the precedence clear
1 parent 28688a1 commit 03c57b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

niworkflows/reports/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,8 @@ def _process_orderings(orderings, layout):
463463
]
464464
# if all values are None for an entity, we do not want to keep that entity
465465
keep_idx = [
466-
not (len(val_set) == 1 and None in val_set or not val_set) for val_set in unique_values
466+
not ((len(val_set) == 1 and None in val_set) or not val_set)
467+
for val_set in unique_values
467468
]
468469
# the "kept" entities
469470
entities = list(compress(orderings, keep_idx))

0 commit comments

Comments
 (0)