From c4ae1335f29e854f1102d3dd44ea4c23e99d8c5d Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 19 Mar 2024 02:25:31 -0400 Subject: [PATCH] chore: follow suggestions Signed-off-by: Henry Schreiner --- setup.py | 5 ++++- src/boost_histogram/_internal/hist.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 9e9e49c4..43de64b0 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,7 @@ from __future__ import annotations +import functools +import operator import os import platform import sys @@ -10,6 +12,7 @@ DIR = Path(__file__).parent.resolve() sys.path.append(str(DIR / "extern" / "pybind11")) + from pybind11.setup_helpers import ParallelCompile, Pybind11Extension # noqa: E402 del sys.path[-1] @@ -67,7 +70,7 @@ "examples": ["matplotlib", "xarray", "xhistogram", "netCDF4", "numba", "uproot3"], "dev": ["ipykernel", "typer"], } -extras["all"] = sum(extras.values(), []) +extras["all"] = functools.reduce(operator.iadd, extras.values(), []) extras["dev"] += extras["test"] setup(ext_modules=ext_modules, extras_require=extras) diff --git a/src/boost_histogram/_internal/hist.py b/src/boost_histogram/_internal/hist.py index ccc7ac17..67219ab4 100644 --- a/src/boost_histogram/_internal/hist.py +++ b/src/boost_histogram/_internal/hist.py @@ -241,7 +241,7 @@ def __init__( # Check all available histograms, and if the storage matches, return that one for h in _histograms: if isinstance(storage, h._storage_type): - self._hist = h(axes, storage) # type: ignore[unreachable] + self._hist = h(axes, storage) # type: ignore[arg-type] self.axes = self._generate_axes_() return