Skip to content

Commit

Permalink
Remove unnecessary list comprehension.
Browse files Browse the repository at this point in the history
  • Loading branch information
YooSunYoung committed Dec 10, 2024
1 parent 01c9eff commit 525fb64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scicat_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,11 @@ def _select_applicable_schema(
for key, conditions in selector.items():
if key == "or":
output = output and any(
[_select_applicable_schema(item, filename) for item in conditions]
_select_applicable_schema(item, filename) for item in conditions
)
elif key == "and":
output = output and all(
[_select_applicable_schema(item, filename) for item in conditions]
_select_applicable_schema(item, filename) for item in conditions
)
else:
raise NotImplementedError("Invalid operator")
Expand Down

0 comments on commit 525fb64

Please sign in to comment.