From 873e0561a2e62fa17d51a9f770141dc28b2cb9ae Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 21:51:26 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.5.7 → v0.6.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.7...v0.6.1) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8a955e2..9b0a771 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: args: - --target-version=py38 - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.7 + rev: v0.6.1 hooks: - id: ruff - repo: https://github.com/PyCQA/isort From 10a3239290146639a26430105d420e514095ea5b Mon Sep 17 00:00:00 2001 From: Martin Durant Date: Tue, 20 Aug 2024 09:49:05 -0400 Subject: [PATCH 2/2] fixes --- src/dask_histogram/boost.py | 2 +- tests/test_boost.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dask_histogram/boost.py b/src/dask_histogram/boost.py index 3f79269..d445b68 100644 --- a/src/dask_histogram/boost.py +++ b/src/dask_histogram/boost.py @@ -166,7 +166,7 @@ def _rebuild( @property def _in_memory_type(self) -> type[bh.Histogram]: - if type(self) != Histogram: + if type(self) is not Histogram: warnings.warn( """dask_histogram.boost.Histogram has been subclassed without overriding '_in_memory_type', please do so if you would like to diff --git a/tests/test_boost.py b/tests/test_boost.py index 0dd68f5..c982642 100644 --- a/tests/test_boost.py +++ b/tests/test_boost.py @@ -520,7 +520,7 @@ def test_add(use_weights): def test_name_assignment(): import dask.array as da - hist = pytest.importorskip("hist") + pytest.importorskip("hist") import hist.dask x = da.random.normal(size=100) @@ -545,7 +545,7 @@ def test_histref_pickle(): import dask.array as da - hist = pytest.importorskip("hist") + pytest.importorskip("hist") import hist.dask x = da.random.normal(size=100)