Skip to content

Commit 9f4c805

Browse files
pre-commit-ci[bot]Shadow-Devil
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 3db198d commit 9f4c805

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

monai/auto3dseg/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import warnings
1818
from copy import deepcopy
1919
from numbers import Number
20-
from typing import Any, cast
20+
from typing import Any
2121

2222
import numpy as np
2323
import torch

monai/utils/module.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from pydoc import locate
2525
from re import match
2626
from types import FunctionType
27-
from typing import Any, cast
27+
from typing import Any
2828

2929
import torch
3030

@@ -95,7 +95,7 @@ class Color(Enum):
9595
if isinstance(opt_str, str):
9696
opt_str = opt_str.strip()
9797
if isinstance(supported, enum.EnumMeta):
98-
if isinstance(opt_str, str) and opt_str in set(item.value for item in supported): # type: ignore
98+
if isinstance(opt_str, str) and opt_str in {item.value for item in supported}: # type: ignore
9999
# such as: "example" in MyEnum
100100
return supported(opt_str)
101101
if isinstance(opt_str, enum.Enum) and opt_str in supported:

0 commit comments

Comments
 (0)