File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 17
17
import warnings
18
18
from copy import deepcopy
19
19
from numbers import Number
20
- from typing import Any , cast
20
+ from typing import Any
21
21
22
22
import numpy as np
23
23
import torch
Original file line number Diff line number Diff line change 24
24
from pydoc import locate
25
25
from re import match
26
26
from types import FunctionType
27
- from typing import Any , cast
27
+ from typing import Any
28
28
29
29
import torch
30
30
@@ -95,7 +95,7 @@ class Color(Enum):
95
95
if isinstance (opt_str , str ):
96
96
opt_str = opt_str .strip ()
97
97
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
99
99
# such as: "example" in MyEnum
100
100
return supported (opt_str )
101
101
if isinstance (opt_str , enum .Enum ) and opt_str in supported :
You can’t perform that action at this time.
0 commit comments