Skip to content

Commit a9d12de

Browse files
committed
Fix "trailing" whitespace in C docstrings.
and harmonize description of functions that are noops on some OSes.
1 parent dc1e9c1 commit a9d12de

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

src/_c_internal_utils.c

+11-10
Original file line numberDiff line numberDiff line change
@@ -183,31 +183,32 @@ static PyMethodDef functions[] = {
183183
"Check whether the current X11 or Wayland display is valid.\n\n"
184184
"On Linux, returns True if either $DISPLAY is set and XOpenDisplay(NULL)\n"
185185
"succeeds, or $WAYLAND_DISPLAY is set and wl_display_connect(NULL)\n"
186-
"succeeds. On other platforms, always returns True."},
186+
"succeeds.\n\n"
187+
"On other platforms, always returns True."},
187188
{"Win32_GetCurrentProcessExplicitAppUserModelID",
188189
(PyCFunction)mpl_GetCurrentProcessExplicitAppUserModelID, METH_NOARGS,
189190
"Win32_GetCurrentProcessExplicitAppUserModelID()\n--\n\n"
190-
"Wrapper for Windows's GetCurrentProcessExplicitAppUserModelID. On \n"
191-
"non-Windows platforms, always returns None."},
191+
"Wrapper for Windows's GetCurrentProcessExplicitAppUserModelID.\n\n"
192+
"On non-Windows platforms, always returns None."},
192193
{"Win32_SetCurrentProcessExplicitAppUserModelID",
193194
(PyCFunction)mpl_SetCurrentProcessExplicitAppUserModelID, METH_O,
194195
"Win32_SetCurrentProcessExplicitAppUserModelID(appid, /)\n--\n\n"
195-
"Wrapper for Windows's SetCurrentProcessExplicitAppUserModelID. On \n"
196-
"non-Windows platforms, a no-op."},
196+
"Wrapper for Windows's SetCurrentProcessExplicitAppUserModelID.\n\n"
197+
"On non-Windows platforms, does nothing."},
197198
{"Win32_GetForegroundWindow",
198199
(PyCFunction)mpl_GetForegroundWindow, METH_NOARGS,
199200
"Win32_GetForegroundWindow()\n--\n\n"
200-
"Wrapper for Windows' GetForegroundWindow. On non-Windows platforms, \n"
201-
"always returns None."},
201+
"Wrapper for Windows' GetForegroundWindow.\n\n"
202+
"On non-Windows platforms, always returns None."},
202203
{"Win32_SetForegroundWindow",
203204
(PyCFunction)mpl_SetForegroundWindow, METH_O,
204205
"Win32_SetForegroundWindow(hwnd, /)\n--\n\n"
205-
"Wrapper for Windows' SetForegroundWindow. On non-Windows platforms, \n"
206-
"a no-op."},
206+
"Wrapper for Windows' SetForegroundWindow.\n\n"
207+
"On non-Windows platforms, does nothing."},
207208
{"Win32_SetProcessDpiAwareness_max",
208209
(PyCFunction)mpl_SetProcessDpiAwareness_max, METH_NOARGS,
209210
"Win32_SetProcessDpiAwareness_max()\n--\n\n"
210-
"Set Windows' process DPI awareness to best option available.\n"
211+
"Set Windows' process DPI awareness to best option available.\n\n"
211212
"On non-Windows platforms, does nothing."},
212213
{NULL, NULL}}; // sentinel.
213214
static PyModuleDef util_module = {

src/_path_wrapper.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ const char *Py_convert_to_string__doc__ =
697697
"--\n\n"
698698
"Convert *path* to a bytestring.\n"
699699
"\n"
700-
"The first five parameters (up to *sketch*) are interpreted as in \n"
700+
"The first five parameters (up to *sketch*) are interpreted as in\n"
701701
"`.cleanup_path`. The following ones are detailed below.\n"
702702
"\n"
703703
"Parameters\n"
@@ -709,7 +709,7 @@ const char *Py_convert_to_string__doc__ =
709709
"sketch : tuple of 3 floats, or None\n"
710710
"precision : int\n"
711711
" The precision used to \"%.*f\"-format the values. Trailing zeros\n"
712-
" and decimal points are always removed. (precision=-1 is a special \n"
712+
" and decimal points are always removed. (precision=-1 is a special\n"
713713
" case used to implement ttconv-back-compatible conversion.)\n"
714714
"codes : sequence of 5 bytestrings\n"
715715
" The bytes representation of each opcode (MOVETO, LINETO, CURVE3,\n"

src/qhull_wrap.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ static PyMethodDef qhull_methods[] = {
309309
"Parameters\n"
310310
"----------\n"
311311
"x, y : 1d arrays\n"
312-
" The coordinates of the point set, which must consist of at least \n"
312+
" The coordinates of the point set, which must consist of at least\n"
313313
" three unique points.\n"
314314
"\n"
315315
"Returns\n"

0 commit comments

Comments
 (0)