gh-91118: Fix docstrings that do not honor --without-doc-strings (#31769)
Co-authored-by: Éric <merwok@netwok.org> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
@@ -341,6 +341,11 @@ _Py_subs_parameters(PyObject *self, PyObject *args, PyObject *parameters, PyObje
|
||||
return newargs;
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(genericalias__doc__,
|
||||
"Represent a PEP 585 generic type\n"
|
||||
"\n"
|
||||
"E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).");
|
||||
|
||||
static PyObject *
|
||||
ga_getitem(PyObject *self, PyObject *item)
|
||||
{
|
||||
@@ -703,14 +708,11 @@ ga_iter(PyObject *self) {
|
||||
|
||||
// TODO:
|
||||
// - argument clinic?
|
||||
// - __doc__?
|
||||
// - cache?
|
||||
PyTypeObject Py_GenericAliasType = {
|
||||
PyVarObject_HEAD_INIT(&PyType_Type, 0)
|
||||
.tp_name = "types.GenericAlias",
|
||||
.tp_doc = "Represent a PEP 585 generic type\n"
|
||||
"\n"
|
||||
"E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).",
|
||||
.tp_doc = genericalias__doc__,
|
||||
.tp_basicsize = sizeof(gaobject),
|
||||
.tp_dealloc = ga_dealloc,
|
||||
.tp_repr = ga_repr,
|
||||
|
||||
Reference in New Issue
Block a user