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) 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