File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change 2727
2828@MCPServer ()
2929class PptxNodeToolkit (BaseToolkit ):
30- r"""A toolkit for creating PowerPoint presentations using PptxGenJS (Node.js)."""
30+ r"""A toolkit for creating PowerPoint presentations using PptxGenJS
31+ (Node.js).
32+ """
3133
3234 def __init__ (
3335 self ,
@@ -119,7 +121,10 @@ def create_presentation(
119121 json_obj = json .loads (content )
120122 content_str = json .dumps (json_obj )
121123 except json .JSONDecodeError :
122- return "Error: Content must be valid JSON string representing slides."
124+ return (
125+ "Error: Content must be valid JSON string representing "
126+ "slides."
127+ )
123128
124129 # Run node script
125130 result = subprocess .run (
@@ -133,9 +138,16 @@ def create_presentation(
133138 try :
134139 script_output = json .loads (result .stdout .strip ())
135140 if script_output .get ("success" ):
136- return f"Presentation created successfully. Path: { script_output .get ('path' )} , Slides: { script_output .get ('slides' )} "
141+ return (
142+ f"Presentation created successfully. "
143+ f"Path: { script_output .get ('path' )} , "
144+ f"Slides: { script_output .get ('slides' )} "
145+ )
137146 else :
138- return f"Error creating presentation: { script_output .get ('error' )} "
147+ return (
148+ f"Error creating presentation: "
149+ f"{ script_output .get ('error' )} "
150+ )
139151 except json .JSONDecodeError :
140152 return f"Error parsing script output: { result .stdout .strip ()} "
141153
You can’t perform that action at this time.
0 commit comments