Skip to content

Commit 3a26e29

Browse files
gh-117764: Add signatures in the atexit module (GH-117776)
1 parent 35f60c3 commit 3a26e29

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Modules/atexitmodule.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ _PyAtExit_Call(PyInterpreterState *interp)
164164

165165

166166
PyDoc_STRVAR(atexit_register__doc__,
167-
"register(func, *args, **kwargs) -> func\n\
167+
"register($module, func, /, *args, **kwargs)\n\
168+
--\n\
168169
\n\
169170
Register a function to be executed upon normal program termination\n\
170171
\n\
@@ -221,7 +222,8 @@ atexit_register(PyObject *module, PyObject *args, PyObject *kwargs)
221222
}
222223

223224
PyDoc_STRVAR(atexit_run_exitfuncs__doc__,
224-
"_run_exitfuncs() -> None\n\
225+
"_run_exitfuncs($module, /)\n\
226+
--\n\
225227
\n\
226228
Run all registered exit functions.\n\
227229
\n\
@@ -236,7 +238,8 @@ atexit_run_exitfuncs(PyObject *module, PyObject *unused)
236238
}
237239

238240
PyDoc_STRVAR(atexit_clear__doc__,
239-
"_clear() -> None\n\
241+
"_clear($module, /)\n\
242+
--\n\
240243
\n\
241244
Clear the list of previously registered exit functions.");
242245

@@ -248,7 +251,8 @@ atexit_clear(PyObject *module, PyObject *unused)
248251
}
249252

250253
PyDoc_STRVAR(atexit_ncallbacks__doc__,
251-
"_ncallbacks() -> int\n\
254+
"_ncallbacks($module, /)\n\
255+
--\n\
252256
\n\
253257
Return the number of registered exit functions.");
254258

@@ -260,7 +264,8 @@ atexit_ncallbacks(PyObject *module, PyObject *unused)
260264
}
261265

262266
PyDoc_STRVAR(atexit_unregister__doc__,
263-
"unregister(func) -> None\n\
267+
"unregister($module, func, /)\n\
268+
--\n\
264269
\n\
265270
Unregister an exit function which was previously registered using\n\
266271
atexit.register\n\

0 commit comments

Comments
 (0)