diff options
Diffstat (limited to 'python/indexfile.cc')
| -rw-r--r-- | python/indexfile.cc | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/python/indexfile.cc b/python/indexfile.cc index 524e59a4..037be210 100644 --- a/python/indexfile.cc +++ b/python/indexfile.cc @@ -27,7 +27,9 @@ static PyObject *IndexFileArchiveURI(PyObject *Self,PyObject *Args) static PyMethodDef IndexFileMethods[] = { - {"archive_uri",IndexFileArchiveURI,METH_VARARGS,"Returns the ArchiveURI"}, + {"archive_uri",IndexFileArchiveURI,METH_VARARGS, + "archive_uri(path: str) -> str\n\n" + "Return the URI to the given path in the archive."}, {} }; @@ -67,15 +69,26 @@ static PyObject *IndexFileRepr(PyObject *Self) #undef S static PyGetSetDef IndexFileGetSet[] = { - {"describe",IndexFileGetDescribe}, - {"exists",IndexFileGetExists}, - {"has_packages",IndexFileGetHasPackages}, - {"is_trusted",IndexFileGetIsTrusted}, - {"label",IndexFileGetLabel}, - {"size",IndexFileGetSize}, + {"describe",IndexFileGetDescribe,0, + "A string describing the index file."}, + {"exists",IndexFileGetExists,0, + "A boolean value determining whether the index file exists."}, + {"has_packages",IndexFileGetHasPackages,0, + "A boolean value determining whether the index file has packages."}, + {"is_trusted",IndexFileGetIsTrusted,0, + "A boolean value determining whether the file can be trusted; e.g.\n" + "because it is from a source with a GPG signed Release file."}, + {"label",IndexFileGetLabel,0, + "The label of the index file."}, + {"size",IndexFileGetSize,0, + "The size of the files, measured in bytes."}, {} }; +static const char *indexfile_doc = + "Represent an index file, i.e. package indexes, translation indexes,\n" + "and source indexes."; + PyTypeObject PyIndexFile_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) @@ -100,7 +113,7 @@ PyTypeObject PyIndexFile_Type = 0, // tp_setattro 0, // tp_as_buffer Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, // tp_flags - "IndexFile Object", // tp_doc + indexfile_doc, // tp_doc CppTraverse<pkgIndexFile*>, // tp_traverse CppClear<pkgIndexFile*>, // tp_clear 0, // tp_richcompare |
