@@ -19,7 +19,7 @@ class ActionList(ABC):
19
19
def load (cls , alist : list , namespace : dict ): # pass globals() for namespace
20
20
new = cls ()
21
21
for v in alist :
22
- v = v if (dtype := parsetype (v )) == "others" else namespace [dtype ].load (v )
22
+ v = v if (dtype := parsetype (v )) == "others" else namespace [dtype ].load (v ) # noqa
23
23
new .uput (v )
24
24
return new
25
25
@@ -41,7 +41,7 @@ def uput(self, val: Any):
41
41
typestr , args = unpack (val )
42
42
# ActionList type checking
43
43
assert (
44
- True if (dtype := self .dtype ) is None else dtype == typestr
44
+ True if (dtype := self .dtype ) is None else dtype == typestr # noqa
45
45
), "ActionList can only hold things of the same type"
46
46
put_func = getattr (self , "put" + typestr )
47
47
put_func (* args )
@@ -68,7 +68,7 @@ def dump(self) -> list:
68
68
def load (cls , alist : list , namespace : dict ): # pass globals() for namespace
69
69
new = cls ()
70
70
for v in alist :
71
- v = v if ( dtype := parsetype (v )) == "others" else namespace [dtype ].load (v )
71
+ v = v if parsetype (v ) == "others" else namespace [parsetype ( v ) ].load (v )
72
72
new .uput (v )
73
73
return new
74
74
@@ -77,8 +77,8 @@ def uput(self, val: Any):
77
77
typestr , args = unpack (val )
78
78
# ActionList type checking
79
79
assert (
80
- True if ( dtype := self .dtype ) is None else dtype == typestr
81
- ), "ActionList can only hold things of the same type"
80
+ True if self .dtype is None else self . dtype == typestr
81
+ ), "ActionList can only hold things of the same type" # noqa
82
82
put_func = getattr (self , "put" + typestr )
83
83
put_func (* args )
84
84
0 commit comments