Skip to content

Commit

Permalink
apply ruff unsafe fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfeickert committed Mar 20, 2024
1 parent 429e745 commit 9a1721b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pyhf/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
from pyhf import exceptions, schema
from pyhf.mixins import _ChannelSummaryMixin
from pyhf.pdf import Model
import functools
import operator

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -465,8 +467,8 @@ def data(self, model, include_auxdata=True):
"""
try:
observed_data = sum(
(self.observations[c] for c in model.config.channels), []
observed_data = functools.reduce(
operator.iadd, (self.observations[c] for c in model.config.channels), []
)
except KeyError:
log.error(
Expand Down

0 comments on commit 9a1721b

Please sign in to comment.