You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Pdb) h a
a(rgs)
Print the argument list of the current function.
(Pdb)
a(rgs) is a little bit confusing by itself and the description's indentation is too long(directly from the docstring). commands is even worse.
(Pdb) h commands
commands [bpnumber]
(com) ...
(com) end
(Pdb)
The docstring for each command is not entirely unified (whether there's a space between the command and the description) and for some docstrings they don't match the documentation.
(Pdb) h enable
enable bpnumber [bpnumber ...]
is different than the documentationenable [bpnumber ...]
* Made all the command part of the docstring match the official documentation
* Always have a space between the command and the description in docstring
* Added a helper function to format the help message
Before:
```
(Pdb) h a
a(rgs)
Print the argument list of the current function.
(Pdb) h commands
commands [bpnumber]
(com) ...
(com) end
(Pdb)
...
(Pdb) h interact
interact
Start an interactive interpreter whose global namespace
contains all the (global and local) names found in the current scope.
```
After
```
(Pdb) h a
Usage: a(rgs)
Print the argument list of the current function.
(Pdb) h commands
Usage: (Pdb) commands [bpnumber]
(com) ...
(com) end
(Pdb)
...
(Pdb) h interact
Usage: interact
Start an interactive interpreter whose global namespace
contains all the (global and local) names found in the current scope.
```
Automerge-Triggered-By: GH:brandtbucher
aisk
pushed a commit
to aisk/cpython
that referenced
this issue
Apr 18, 2023
…03144)
* Made all the command part of the docstring match the official documentation
* Always have a space between the command and the description in docstring
* Added a helper function to format the help message
Before:
```
(Pdb) h a
a(rgs)
Print the argument list of the current function.
(Pdb) h commands
commands [bpnumber]
(com) ...
(com) end
(Pdb)
...
(Pdb) h interact
interact
Start an interactive interpreter whose global namespace
contains all the (global and local) names found in the current scope.
```
After
```
(Pdb) h a
Usage: a(rgs)
Print the argument list of the current function.
(Pdb) h commands
Usage: (Pdb) commands [bpnumber]
(com) ...
(com) end
(Pdb)
...
(Pdb) h interact
Usage: interact
Start an interactive interpreter whose global namespace
contains all the (global and local) names found in the current scope.
```
Automerge-Triggered-By: GH:brandtbucher
Feature or enhancement
Make
pdb
's help message less ugly.Pitch
Currently, the help message of pdb is not pretty.
a(rgs)
is a little bit confusing by itself and the description's indentation is too long(directly from the docstring).commands
is even worse.The docstring for each command is not entirely unified (whether there's a space between the command and the description) and for some docstrings they don't match the documentation.
is different than the documentation
enable [bpnumber ...]
We can make it better and more user friendly.
Linked PRs
The text was updated successfully, but these errors were encountered: