diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1ebd4d87..38cb6a93 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"] diff --git a/src/bioframe/core/arrops.py b/src/bioframe/core/arrops.py index ab8c7527..ad8c2b60 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 4218dcd6..9c1f8c5c 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 66c0fd2a..fd4d840c 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