From 97d51a8465bd468734449cd4e624429b8267d3c8 Mon Sep 17 00:00:00 2001 From: TsXor Date: Wed, 7 Sep 2022 19:57:19 +0800 Subject: [PATCH] style(examples): please our little puppy: hound It seems that hound still think a line should only have 80 chars though you set it to 120. Signed-off-by: TsXor --- examples/emboss_action.py | 5 ++++- examples/import_image_as_layer.py | 6 ++++-- examples/session_smart_sharpen.py | 3 ++- examples/smart_sharpen.py | 3 ++- photoshop/api/action_manager/js_converter/convert.py | 2 +- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/examples/emboss_action.py b/examples/emboss_action.py index 9fa08d92..7780e70c 100644 --- a/examples/emboss_action.py +++ b/examples/emboss_action.py @@ -26,7 +26,10 @@ "_classID": "contentLayer", "type": { "_classID": "solidColorLayer", - "color": {"_classID": "RGBColor", "red": index, "grain": index, "blue": index}, + "color": {"_classID": "RGBColor", + "red": index, + "grain": index, + "blue": index}, }, }, } diff --git a/examples/import_image_as_layer.py b/examples/import_image_as_layer.py index 41eab47f..45468a73 100644 --- a/examples/import_image_as_layer.py +++ b/examples/import_image_as_layer.py @@ -9,6 +9,8 @@ with Session(action="new_document") as ps: - import_dict = {"_classID": None, "null": pathlib.Path("your/image/path")} # replace it with your own path here + # replace it with your own path here + import_dict = {"_classID": None, "null": pathlib.Path("your/image/path")} import_desc = ps.ActionDescriptor.load(import_dict) - ps.app.executeAction(am.str2id("Plc "), import_desc) # `Plc` need one space in here. + ps.app.executeAction(am.str2id("Plc "), import_desc) + # length of charID should always be 4, if not, pad with spaces diff --git a/examples/session_smart_sharpen.py b/examples/session_smart_sharpen.py index 974d16af..3b08a7a1 100644 --- a/examples/session_smart_sharpen.py +++ b/examples/session_smart_sharpen.py @@ -22,7 +22,8 @@ def SmartSharpen(inAmount, inRadius, inNoise): ss_dict = { "_classID": None, - "presetKindType": am.Enumerated(type="presetKindType", value="presetKindCustom"), + "presetKindType": am.Enumerated(type="presetKindType", + value="presetKindCustom"), "amount": am.UnitDouble(unit="radius", double=inAmount), "radius": am.UnitDouble(unit="pixelsUnit", double=inRadius), "noiseReduction": am.UnitDouble(unit="percentUnit", double=inNoise), diff --git a/examples/smart_sharpen.py b/examples/smart_sharpen.py index c23d554a..cdd53965 100644 --- a/examples/smart_sharpen.py +++ b/examples/smart_sharpen.py @@ -28,7 +28,8 @@ def SmartSharpen(inAmount, inRadius, inNoise): ss_dict = { "_classID": None, - "presetKindType": am.Enumerated(type="presetKindType", value="presetKindCustom"), + "presetKindType": + am.Enumerated(type="presetKindType", value="presetKindCustom"), "amount": am.UnitDouble(unit="radius", double=inAmount), "radius": am.UnitDouble(unit="pixelsUnit", double=inRadius), "noiseReduction": am.UnitDouble(unit="percentUnit", double=inNoise), diff --git a/photoshop/api/action_manager/js_converter/convert.py b/photoshop/api/action_manager/js_converter/convert.py index 91df351b..65ef748b 100644 --- a/photoshop/api/action_manager/js_converter/convert.py +++ b/photoshop/api/action_manager/js_converter/convert.py @@ -99,7 +99,7 @@ def parseref(tdict): if sys.version.split("(")[0].split(".")[1] <= 7: - def parseref(tdict): + def parseref(tdict): # noqa d2l = [tdict[str(i)] for i in range(tdict["len"])] plist = ["!ref"] plist.extend(