Skip to content

Commit

Permalink
Simplify one-line if statement as per codacy suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter9192 committed Mar 30, 2021
1 parent db3aa93 commit 99159ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion esmvalcore/preprocessor/_multimodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def _multicube_statistics(cubes, statistics, span):
raise ValueError('Cannot perform multicube statistics '
'for a single cube.')

lazy_input = True if all(cube.has_lazy_data() for cube in cubes) else False
lazy_input = bool(all(cube.has_lazy_data() for cube in cubes))

copied_cubes = [cube.copy() for cube in cubes] # avoid modifying inputs
aligned_cubes = _align(copied_cubes, span=span)
Expand Down

0 comments on commit 99159ac

Please sign in to comment.