Skip to content

Commit c347ac8

Browse files
committed
Improved documentation
1 parent 9c5c314 commit c347ac8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cmd2/pyscript_bridge.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def __init__(self, cmd2_app):
251251

252252
def __getattr__(self, item: str):
253253
"""
254-
Provide a way to call application commands via the PyscriptBridge
254+
Provide functionality to call application commands as a method of PyscriptBridge
255255
ex: app.help()
256256
"""
257257
func = self._cmd2_app.cmd_func(item)
@@ -278,13 +278,15 @@ def __dir__(self):
278278

279279
def __call__(self, args: str, echo: Optional[bool]=None) -> CommandResult:
280280
"""
281-
Call a command function (ex: do_help)
281+
Provide functionality to call application commands by calling PyscriptBridge
282+
ex: app('help')
282283
:param args: The string being passed to the command
283284
:param echo: If True, output will be echoed while the command runs
284285
This temporarily overrides the value of self.cmd_echo
285286
"""
286287
if echo is None:
287288
echo = self.cmd_echo
288289

289-
return _exec_cmd(self._cmd2_app, functools.partial(self._cmd2_app.onecmd_plus_hooks, args + '\n'),
290+
return _exec_cmd(self._cmd2_app,
291+
functools.partial(self._cmd2_app.onecmd_plus_hooks, args + '\n'),
290292
echo)

0 commit comments

Comments
 (0)