Skip to content

Commit 29cbb44

Browse files
[3.15] gh-150285: Fix too long docstrings in the curses module (GH-150286) (GH-150331)
(cherry picked from commit 4c0fe2d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent 1b7ab11 commit 29cbb44

5 files changed

Lines changed: 381 additions & 347 deletions

File tree

Lib/curses/textpad.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ class Textbox:
2323
Ctrl-A Go to left edge of window.
2424
Ctrl-B Cursor left, wrapping to previous line if appropriate.
2525
Ctrl-D Delete character under cursor.
26-
Ctrl-E Go to right edge (stripspaces off) or end of line (stripspaces on).
26+
Ctrl-E Go to right edge (stripspaces off) or end of line
27+
(stripspaces on).
2728
Ctrl-F Cursor right, wrapping to next line when appropriate.
2829
Ctrl-G Terminate, returning the window contents.
2930
Ctrl-H Delete character backward.
@@ -34,11 +35,12 @@ class Textbox:
3435
Ctrl-O Insert a blank line at cursor location.
3536
Ctrl-P Cursor up; move up one line.
3637
37-
Move operations do nothing if the cursor is at an edge where the movement
38-
is not possible. The following synonyms are supported where possible:
38+
Move operations do nothing if the cursor is at an edge where the
39+
movement is not possible. The following synonyms are supported where
40+
possible:
3941
40-
KEY_LEFT = Ctrl-B, KEY_RIGHT = Ctrl-F, KEY_UP = Ctrl-P, KEY_DOWN = Ctrl-N
41-
KEY_BACKSPACE = Ctrl-h
42+
KEY_LEFT = Ctrl-B, KEY_RIGHT = Ctrl-F, KEY_UP = Ctrl-P,
43+
KEY_DOWN = Ctrl-N, KEY_BACKSPACE = Ctrl-h
4244
"""
4345
def __init__(self, win, insert_mode=False):
4446
self.win = win

Modules/_curses_panel.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -360,17 +360,17 @@ _curses_panel_panel_bottom_impl(PyCursesPanelObject *self)
360360
}
361361

362362
/*[clinic input]
363-
@permit_long_docstring_body
364363
_curses_panel.panel.hide
365364
366365
Hide the panel.
367366
368-
This does not delete the object, it just makes the window on screen invisible.
367+
This does not delete the object, it just makes the window on screen
368+
invisible.
369369
[clinic start generated code]*/
370370

371371
static PyObject *
372372
_curses_panel_panel_hide_impl(PyCursesPanelObject *self)
373-
/*[clinic end generated code: output=a7bbbd523e1eab49 input=9071b463a39a1a6a]*/
373+
/*[clinic end generated code: output=a7bbbd523e1eab49 input=9456aca9b264dde1]*/
374374
{
375375
int rtn = hide_panel(self->pan);
376376
return curses_panel_panel_check_err(self, rtn, "hide_panel", "hide");
@@ -772,12 +772,13 @@ _curses_panel.update_panels
772772
773773
Updates the virtual screen after changes in the panel stack.
774774
775-
This does not call curses.doupdate(), so you'll have to do this yourself.
775+
This does not call curses.doupdate(), so you'll have to do this
776+
yourself.
776777
[clinic start generated code]*/
777778

778779
static PyObject *
779780
_curses_panel_update_panels_impl(PyObject *module)
780-
/*[clinic end generated code: output=2f3b4c2e03d90ded input=5299624c9a708621]*/
781+
/*[clinic end generated code: output=2f3b4c2e03d90ded input=0d0db79f05ec3ef4]*/
781782
{
782783
PyCursesInitialised;
783784
update_panels();

0 commit comments

Comments
 (0)