Skip to content

Commit 5e55207

Browse files
committed
linting
1 parent 4d215a7 commit 5e55207

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

src/pyhf/workspace.py

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,10 @@ def _join_channels(join, left_channels, right_channels, merge=False):
119119
"""
120120

121121
joined_channels = _join_items(
122-
join, left_channels, right_channels, deep_merge_key='samples' if merge else None
122+
join,
123+
left_channels,
124+
right_channels,
125+
deep_merge_key='samples' if merge else None,
123126
)
124127
if join == 'none':
125128
common_channels = {c['name'] for c in left_channels}.intersection(
@@ -288,7 +291,12 @@ class Workspace(_ChannelSummaryMixin, dict):
288291
A JSON-serializable object that is built from an object that follows the :obj:`workspace.json` `schema <https://scikit-hep.org/pyhf/likelihood.html#workspace>`__.
289292
"""
290293

291-
valid_joins: ClassVar[list[str]] = ['none', 'outer', 'left outer', 'right outer']
294+
valid_joins: ClassVar[list[str]] = [
295+
'none',
296+
'outer',
297+
'left outer',
298+
'right outer',
299+
]
292300

293301
def __init__(self, spec, validate: bool = True, **config_kwargs):
294302
"""
@@ -611,7 +619,8 @@ def _prune_and_rename(
611619
if parameter['name'] not in prune_modifiers
612620
],
613621
'poi': rename_modifiers.get(
614-
measurement['config']['poi'], measurement['config']['poi']
622+
measurement['config']['poi'],
623+
measurement['config']['poi'],
615624
),
616625
},
617626
}
@@ -707,7 +716,12 @@ def rename(self, modifiers=None, samples=None, channels=None, measurements=None)
707716

708717
@classmethod
709718
def combine(
710-
cls, left, right, join='none', merge_channels=False, validate: bool = True
719+
cls,
720+
left,
721+
right,
722+
join='none',
723+
merge_channels=False,
724+
validate: bool = True,
711725
):
712726
"""
713727
Return a new workspace specification that is the combination of the two workspaces.
@@ -746,7 +760,11 @@ def combine(
746760
f"Workspaces must be joined using one of the valid join operations ({Workspace.valid_joins}); not {join}"
747761
)
748762

749-
if merge_channels and join not in ['outer', 'left outer', 'right outer']:
763+
if merge_channels and join not in [
764+
'outer',
765+
'left outer',
766+
'right outer',
767+
]:
750768
raise ValueError(
751769
f"You can only merge channels using the 'outer', 'left outer', or 'right outer' join operations; not {join}"
752770
)

0 commit comments

Comments
 (0)