From 55f26bc179ce4faf5f2422daf2f4fa645ccb2394 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 15:17:43 -0700 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#3255) 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.1 → v0.5.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.1...v0.5.2) --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: C. Titus Brown --- .pre-commit-config.yaml | 2 +- src/sourmash/sbt.py | 2 +- tests/test_search.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cd2f7fee75..fe3558f090 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: - id: check-toml - id: debug-statements - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.1 + rev: v0.5.2 hooks: - id: ruff-format - id: ruff diff --git a/src/sourmash/sbt.py b/src/sourmash/sbt.py index f3ea3e49ec..21e6b25c16 100644 --- a/src/sourmash/sbt.py +++ b/src/sourmash/sbt.py @@ -700,7 +700,7 @@ def save(self, path, storage=None, sparseness=0.0, structure_only=False): storage = FSStorage(location, subdir) index_filename = os.path.join(location, index_filename) - backend = [k for (k, v) in STORAGES.items() if v == type(storage)][0] + backend = [k for (k, v) in STORAGES.items() if v is type(storage)][0] storage_args = storage.init_args() info["storage"] = {"backend": backend, "args": storage_args} diff --git a/tests/test_search.py b/tests/test_search.py index c9c6d601cc..7a6d72a35c 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -44,7 +44,7 @@ def test_make_jaccard_search_query_best_only(): assert search_obj.score_fn == search_obj.score_jaccard assert not search_obj.require_scaled - assert type(search_obj) == search.JaccardSearchBestOnly + assert type(search_obj) is search.JaccardSearchBestOnly def test_make_jaccard_search_query_no_threshold_none():