From 920490ad1ad0c883f36537ee12ab3395782f97df Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Aug 2026 16:29:14 +0000 Subject: [PATCH 1/2] chore: Update pre-commit hooks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.14.7 → v0.16.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.7...v0.16.1) - [github.com/rbubley/mirrors-prettier: v3.7.3 → v3.9.6](https://github.com/rbubley/mirrors-prettier/compare/v3.7.3...v3.9.6) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1ebd4d8..38cb6a9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: - id: check-case-conflict - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.7 + rev: v0.16.1 hooks: - id: ruff-check types_or: [python, pyi, jupyter] @@ -30,7 +30,7 @@ repos: - id: text-unicode-replacement-char - repo: https://github.com/rbubley/mirrors-prettier - rev: v3.7.3 + rev: v3.9.6 hooks: - id: prettier args: ["--cache-location=.prettier_cache/cache"] From 03c72823c438b666966cf319b5c3b651f6792e30 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Aug 2026 16:31:55 +0000 Subject: [PATCH 2/2] style: Pre-commit fixes --- src/bioframe/core/arrops.py | 2 +- src/bioframe/sandbox/clients.py | 3 +-- tests/test_ops.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/bioframe/core/arrops.py b/src/bioframe/core/arrops.py index ab8c752..ad8c2b6 100644 --- a/src/bioframe/core/arrops.py +++ b/src/bioframe/core/arrops.py @@ -7,7 +7,7 @@ INT64_MAX = np.iinfo(np.int64).max -def natsort_key(s, _NS_REGEX=re.compile(r"(\d+)", re.U)): +def natsort_key(s, _NS_REGEX=re.compile(r"(\d+)", re.UNICODE)): return tuple([int(x) if x.isdigit() else x for x in _NS_REGEX.split(s) if x]) diff --git a/src/bioframe/sandbox/clients.py b/src/bioframe/sandbox/clients.py index 4218dcd..9c1f8c5 100644 --- a/src/bioframe/sandbox/clients.py +++ b/src/bioframe/sandbox/clients.py @@ -47,8 +47,7 @@ def __init__(self, cachedir, assembly, metadata=None): with requests.get(self.METADATA_URL, stream=True) as r: r.raise_for_status() with open(metadata_path, "wb") as f: - for chunk in r.iter_content(chunk_size=8192): - f.write(chunk) + f.writelines(r.iter_content(chunk_size=8192)) self._meta = pd.read_table(metadata_path, low_memory=False) table_assemblies = sorted( diff --git a/tests/test_ops.py b/tests/test_ops.py index 66c0fd2..fd4d840 100644 --- a/tests/test_ops.py +++ b/tests/test_ops.py @@ -5,7 +5,7 @@ import pytest import bioframe -import bioframe.core.checks as checks +from bioframe.core import checks from bioframe.core.construction import make_viewframe # import pyranges as pr