File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,6 +110,8 @@ prompt is displayed.
110110 now relies exclusively on command function docstrings.
111111 - Removed ` feedback_to_output ` settable and changed ` cmd2.Cmd.pfeedback ` to always print to
112112 ` self.stdout `
113+ - Removed ` Cmd.parseline() ` since it was unused and merely wrapped
114+ ` StatementParser.parse_command_only() ` .
113115- Enhancements
114116 - New ` cmd2.Cmd ` parameters
115117 - ** auto_suggest** : (boolean) if ` True ` , provide fish shell style auto-suggestions. These
Original file line number Diff line number Diff line change @@ -2883,15 +2883,6 @@ def postloop(self) -> None:
28832883 See [Hooks](../features/hooks.md) for more information.
28842884 """
28852885
2886- def parseline (self , line : str ) -> tuple [str , str , str ]:
2887- """Parse the line into a command name and a string containing the arguments.
2888-
2889- :param line: line read by prompt-toolkit
2890- :return: tuple containing (command, args, line)
2891- """
2892- partial_statement = self .statement_parser .parse_command_only (line )
2893- return partial_statement .command , partial_statement .args , partial_statement .command_and_args
2894-
28952886 def onecmd_plus_hooks (
28962887 self ,
28972888 line : str ,
Original file line number Diff line number Diff line change @@ -3527,26 +3527,6 @@ def test_ppretty(base_app: cmd2.Cmd) -> None:
35273527 )
35283528
35293529
3530- # we override cmd.parseline() so we always get consistent
3531- # command parsing by parent methods we don't override
3532- # don't need to test all the parsing logic here, because
3533- # parseline just calls StatementParser.parse_command_only()
3534- def test_parseline_empty (base_app ) -> None :
3535- statement = ""
3536- command , args , line = base_app .parseline (statement )
3537- assert not command
3538- assert not args
3539- assert not line
3540-
3541-
3542- def test_parseline_quoted (base_app ) -> None :
3543- statement = " command with 'partially completed quotes "
3544- command , args , line = base_app .parseline (statement )
3545- assert command == "command"
3546- assert args == "with 'partially completed quotes "
3547- assert line == statement .lstrip ()
3548-
3549-
35503530def test_onecmd_raw_str_continue (outsim_app ) -> None :
35513531 line = "help"
35523532 stop = outsim_app .onecmd (line )
You can’t perform that action at this time.
0 commit comments