Skip to content

Commit 0089f9d

Browse files
committed
style(action_manager): ran black and isort
Signed-off-by: TsXor <[email protected]>
1 parent 2ab813a commit 0089f9d

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

photoshop/api/action_manager/_main_types/action_descriptor.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ def dump(self) -> dict:
5555
# This is a dict comprehension.
5656
ddict = {"_classID": self.classID}
5757
ddict.update(
58-
{key: (value.dump() if hasattr(value := self.uget(key), "dump") else value) for key in self}
59-
) # noqa
58+
{key: (value.dump() if hasattr(value := self.uget(key), "dump") else value) for key in self} # noqa
59+
)
6060
return ddict
6161

6262
def _unpacker(self) -> tuple:

photoshop/api/action_manager/_main_types/action_list.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ActionList(ABC):
1919
def load(cls, alist: list, namespace: dict): # pass globals() for namespace
2020
new = cls()
2121
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
2323
new.uput(v)
2424
return new
2525

@@ -41,7 +41,7 @@ def uput(self, val: Any):
4141
typestr, args = unpack(val)
4242
# ActionList type checking
4343
assert (
44-
True if (dtype := self.dtype) is None else dtype == typestr
44+
True if (dtype := self.dtype) is None else dtype == typestr # noqa
4545
), "ActionList can only hold things of the same type"
4646
put_func = getattr(self, "put" + typestr)
4747
put_func(*args)
@@ -68,7 +68,7 @@ def dump(self) -> list:
6868
def load(cls, alist: list, namespace: dict): # pass globals() for namespace
6969
new = cls()
7070
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)
7272
new.uput(v)
7373
return new
7474

@@ -77,8 +77,8 @@ def uput(self, val: Any):
7777
typestr, args = unpack(val)
7878
# ActionList type checking
7979
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
8282
put_func = getattr(self, "put" + typestr)
8383
put_func(*args)
8484

photoshop/api/action_manager/js_converter/convert.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,10 @@ def parseref(tdict):
8484
plist.extend(
8585
[
8686
(
87-
str2refgetpacker[val["type"]](e) if type(val := e["Value"]) == dict else str2refgetpacker["default"](e)
88-
) # noqa
87+
str2refgetpacker[val["type"]](e)
88+
if type(val := e["Value"]) == dict # noqa
89+
else str2refgetpacker["default"](e)
90+
)
8991
for e in d2l
9092
]
9193
)

0 commit comments

Comments
 (0)