mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Issue #20326: Argument Clinic now uses a simple, unique signature to
annotate text signatures in docstrings, resulting in fewer false positives. "self" parameters are also explicitly marked, allowing inspect.Signature() to authoritatively detect (and skip) said parameters. Issue #20326: Argument Clinic now generates separate checksums for the input and output sections of the block, allowing external tools to verify that the input has not changed (and thus the output is not out-of-date).
This commit is contained in:
parent
eecbbad89b
commit
581ee3618c
37 changed files with 497 additions and 412 deletions
|
@ -182,17 +182,13 @@ static PyMethodDef meth_methods[] = {
|
|||
static PyObject *
|
||||
meth_get__text_signature__(PyCFunctionObject *m, void *closure)
|
||||
{
|
||||
const char *name = m->m_ml->ml_name;
|
||||
const char *doc = m->m_ml->ml_doc;
|
||||
return _PyType_GetTextSignatureFromInternalDoc(name, doc);
|
||||
return _PyType_GetTextSignatureFromInternalDoc(m->m_ml->ml_doc);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
meth_get__doc__(PyCFunctionObject *m, void *closure)
|
||||
{
|
||||
const char *name = m->m_ml->ml_name;
|
||||
const char *doc = m->m_ml->ml_doc;
|
||||
return _PyType_GetDocFromInternalDoc(name, doc);
|
||||
return _PyType_GetDocFromInternalDoc(m->m_ml->ml_doc);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue