From dbf01e12a26efbfd10209b73268cfdb82e442a2c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 21:29:17 +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: - https://github.com/psf/black → https://github.com/psf/black-pre-commit-mirror - [github.com/psf/black-pre-commit-mirror: 23.10.1 → 26.3.1](https://github.com/psf/black-pre-commit-mirror/compare/23.10.1...26.3.1) - [github.com/PyCQA/flake8: 6.1.0 → 7.3.0](https://github.com/PyCQA/flake8/compare/6.1.0...7.3.0) - [github.com/pycqa/isort: 5.12.0 → 8.0.1](https://github.com/pycqa/isort/compare/5.12.0...8.0.1) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index df1bae45..46f0b72d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,14 +1,14 @@ repos: - - repo: https://github.com/psf/black - rev: '23.10.1' + - repo: https://github.com/psf/black-pre-commit-mirror + rev: '26.3.1' hooks: - id: black - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 + rev: 7.3.0 hooks: - id: flake8 - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 8.0.1 hooks: - id: isort name: isort (python) From c3d531fc0020fb0db9949e794a221473838b126d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 21:31:09 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- cell2location/distributions/NegativeBinomial.py | 1 + cell2location/distributions/transforms.py | 1 + cell2location/plt/RotateCrop.py | 1 + 3 files changed, 3 insertions(+) diff --git a/cell2location/distributions/NegativeBinomial.py b/cell2location/distributions/NegativeBinomial.py index 8d42ce0a..772c3a9c 100755 --- a/cell2location/distributions/NegativeBinomial.py +++ b/cell2location/distributions/NegativeBinomial.py @@ -104,6 +104,7 @@ class NegativeBinomial(Distribution): one parameterization to another. """ + arg_constraints = { "mu": constraints.greater_than_eq(0), "theta": constraints.greater_than_eq(0), diff --git a/cell2location/distributions/transforms.py b/cell2location/distributions/transforms.py index 77b00f63..4ae68a29 100644 --- a/cell2location/distributions/transforms.py +++ b/cell2location/distributions/transforms.py @@ -6,6 +6,7 @@ class SoftplusTransform(Transform): r""" Transform via the mapping :math:`\text{Softplus}(x) = \log(1 + \exp(x))`. """ + domain = constraints.real_vector codomain = constraints.positive diff --git a/cell2location/plt/RotateCrop.py b/cell2location/plt/RotateCrop.py index 8d61ef9b..fb69d1b6 100644 --- a/cell2location/plt/RotateCrop.py +++ b/cell2location/plt/RotateCrop.py @@ -1,4 +1,5 @@ r"""Class for rotating and cropping images.""" + import cv2 as cv import numpy as np