diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ef3974397..a27346095 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ default_language_version: repos: - repo: https://github.com/psf/black-pre-commit-mirror - rev: 24.1.1 + rev: 24.2.0 hooks: - id: black pass_filenames: true @@ -20,11 +20,11 @@ repos: - id: debug-statements - id: mixed-line-ending - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.2.1 + rev: v0.2.2 hooks: - id: ruff - repo: https://github.com/asottile/pyupgrade - rev: v3.15.0 + rev: v3.15.1 hooks: - id: pyupgrade args: ["--py38-plus"] diff --git a/package/tests/test_PartSeg/test_common_backend.py b/package/tests/test_PartSeg/test_common_backend.py index 735a1a9b4..c77996583 100644 --- a/package/tests/test_PartSeg/test_common_backend.py +++ b/package/tests/test_PartSeg/test_common_backend.py @@ -467,7 +467,7 @@ def question(*args, **kwargs): @pytest.fixture() def image(tmp_path): - data = np.random.random((10, 10, 2)) + data = np.random.default_rng().uniform(size=(10, 10, 2)) return Image(data=data, image_spacing=(10, 10), axes_order="XYC", file_path=str(tmp_path / "test.tiff")) diff --git a/package/tests/test_PartSeg/test_common_gui.py b/package/tests/test_PartSeg/test_common_gui.py index 536e4361e..d76c21fb3 100644 --- a/package/tests/test_PartSeg/test_common_gui.py +++ b/package/tests/test_PartSeg/test_common_gui.py @@ -152,7 +152,8 @@ def __str__(self): def _example_tiff_files(tmp_path): for i in range(5): ImageWriter.save( - Image(np.random.random((10, 10)), image_spacing=(1, 1), axes_order="XY"), tmp_path / f"img_{i}.tif" + Image(np.random.default_rng().uniform(size=(10, 10)), image_spacing=(1, 1), axes_order="XY"), + tmp_path / f"img_{i}.tif", )