Skip to content

Commit dec62de

Browse files
committed
Merge branch 'dev' into update-base-image
2 parents 90d11bf + c1ceea3 commit dec62de

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+152
-123
lines changed

.github/workflows/blossom-ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ jobs:
3434
(
3535
github.actor == 'Nic-Ma' ||
3636
github.actor == 'wyli' ||
37-
github.actor == 'pxLi' ||
38-
github.actor == 'YanxuanLiu' ||
37+
github.actor == 'wendell-hom' ||
3938
github.actor == 'KumoLiu'
4039
)
4140
steps:

.pre-commit-config.yaml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ci:
99

1010
repos:
1111
- repo: https://github.com/pre-commit/pre-commit-hooks
12-
rev: v4.6.0
12+
rev: v5.0.0
1313
hooks:
1414
- id: end-of-file-fixer
1515
- id: trailing-whitespace
@@ -26,33 +26,30 @@ repos:
2626
args: ['--autofix', '--no-sort-keys', '--indent=4']
2727
- id: end-of-file-fixer
2828
- id: mixed-line-ending
29-
- repo: https://github.com/charliermarsh/ruff-pre-commit
30-
rev: v0.3.5
29+
- repo: https://github.com/astral-sh/ruff-pre-commit
30+
rev: v0.7.0
3131
hooks:
3232
- id: ruff
3333
args:
3434
- --fix
3535

3636
- repo: https://github.com/asottile/pyupgrade
37-
rev: v3.3.1
37+
rev: v3.19.0
3838
hooks:
3939
- id: pyupgrade
40-
args: [--py37-plus]
41-
name: Upgrade code excluding monai networks
40+
args: [--py39-plus, --keep-runtime-typing]
41+
name: Upgrade code with exceptions
4242
exclude: |
4343
(?x)(
4444
^versioneer.py|
4545
^monai/_version.py|
46-
^monai/networks/| # no PEP 604 for torchscript tensorrt
47-
^monai/losses/ # no PEP 604 for torchscript tensorrt
46+
^monai/networks/| # avoid typing rewrites
47+
^monai/apps/detection/utils/anchor_utils.py| # avoid typing rewrites
48+
^tests/test_compute_panoptic_quality.py # avoid typing rewrites
4849
)
49-
- id: pyupgrade
50-
args: [--py37-plus, --keep-runtime-typing]
51-
name: Upgrade monai networks
52-
files: (?x)(^monai/networks/)
5350
5451
- repo: https://github.com/asottile/yesqa
55-
rev: v1.4.0
52+
rev: v1.5.0
5653
hooks:
5754
- id: yesqa
5855
name: Unused noqa

monai/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
from __future__ import annotations
1313

14+
import logging
1415
import os
1516
import sys
16-
import logging
1717
import warnings
18-
from ._version import get_versions
1918

19+
from ._version import get_versions
2020

2121
old_showwarning = warnings.showwarning
2222

monai/apps/detection/networks/retinanet_network.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
import math
4343
import warnings
4444
from collections.abc import Callable, Sequence
45-
from typing import Any, Dict
45+
from typing import Any
4646

4747
import torch
4848
from torch import Tensor, nn
@@ -330,7 +330,7 @@ def forward(self, images: Tensor) -> Any:
330330
features = self.feature_extractor(images)
331331
if isinstance(features, Tensor):
332332
feature_maps = [features]
333-
elif torch.jit.isinstance(features, Dict[str, Tensor]):
333+
elif torch.jit.isinstance(features, dict[str, Tensor]):
334334
feature_maps = list(features.values())
335335
else:
336336
feature_maps = list(features)

monai/apps/detection/transforms/array.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
from __future__ import annotations
1717

18-
from typing import Any, Sequence
18+
from collections.abc import Sequence
19+
from typing import Any
1920

2021
import numpy as np
2122
import torch

monai/apps/generation/maisi/networks/autoencoderkl_maisi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
import gc
1515
import logging
16-
from typing import Sequence
16+
from collections.abc import Sequence
1717

1818
import torch
1919
import torch.nn as nn

monai/apps/generation/maisi/networks/controlnet_maisi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
from __future__ import annotations
1313

14-
from typing import Sequence
14+
from collections.abc import Sequence
1515

1616
import torch
1717

monai/apps/pathology/engines/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
from __future__ import annotations
1313

14-
from typing import Any, Sequence
14+
from collections.abc import Sequence
15+
from typing import Any
1516

1617
import torch
1718

monai/apps/pathology/inferers/inferer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
from __future__ import annotations
1313

14-
from typing import Any, Callable, Sequence
14+
from collections.abc import Sequence
15+
from typing import Any, Callable
1516

1617
import numpy as np
1718
import torch

monai/apps/pathology/metrics/lesion_froc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
from __future__ import annotations
1313

14-
from typing import TYPE_CHECKING, Any, Iterable
14+
from collections.abc import Iterable
15+
from typing import TYPE_CHECKING, Any
1516

1617
import numpy as np
1718

0 commit comments

Comments
 (0)