Skip to content

Commit 14ff296

Browse files
committed
--amend
1 parent d91baf0 commit 14ff296

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/cabinetry/fit/results_containers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Provides containers for inference results."""
22

3-
from typing import Dict, List, NamedTuple, Tuple
3+
from typing import Dict, List, NamedTuple, Optional, Tuple
44

55
import numpy as np
66

@@ -24,7 +24,7 @@ class FitResults(NamedTuple):
2424
bestfit: np.ndarray
2525
uncertainty: np.ndarray
2626
labels: List[str]
27-
types: List[str]
27+
types: List[Optional[str]]
2828
corr_mat: np.ndarray
2929
best_twice_nll: float
3030
goodness_of_fit: float = -1

src/cabinetry/model_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ def _filter_channels(
519519

520520
def _labels_modifiers(
521521
model: pyhf.pdf.Model,
522-
) -> Tuple[List[str], List[str]]:
522+
) -> Tuple[List[str], List[Optional[str]]]:
523523
""" """
524524
labels = model.config.par_names()
525525
_mod_dict = dict(model.config.modifiers)

src/cabinetry/visualize/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ def pulls(
442442
*,
443443
figure_folder: Union[str, pathlib.Path] = "figures",
444444
exclude: Optional[Union[str, List[str], Tuple[str, ...]]] = None,
445-
exclude_by_type: Optional[Union[str, List[str]]] = None,
445+
exclude_by_type: Optional[List[str]] = None,
446446
close_figure: bool = True,
447447
save_figure: bool = True,
448448
) -> mpl.figure.Figure:

tests/test_model_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ def test_match_fit_results(mock_pars, mock_uncs):
396396
np.asarray([1.0, 2.0, 3.0]),
397397
np.asarray([0.1, 0.2, 0.3]),
398398
["par_a", "par_b", "par_c"],
399-
["normfactor", "normfactor", "normfactor"],
399+
[None, None, None],
400400
np.asarray([[1.0, 0.2, 0.5], [0.2, 1.0, 0.1], [0.5, 0.1, 1.0]]),
401401
5.0,
402402
0.1,

0 commit comments

Comments
 (0)