diff options
| author | Julian Andres Klode <jak@debian.org> | 2010-04-01 19:55:13 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2010-04-01 19:55:13 +0200 |
| commit | 17b0dc6856855f2cd46d234357f0de584db2019e (patch) | |
| tree | b17863d7e0c27290c98dc3f19846d44aab27666b /python/sourcelist.cc | |
| parent | c3d6edddcdcd40ff7477430a20a3e3be7e188963 (diff) | |
| download | python-apt-17b0dc6856855f2cd46d234357f0de584db2019e.tar.gz | |
python: Document every class, function, property.
Finally, a complete reference to apt_pkg available
via pydoc and __doc__ attributes.
Diffstat (limited to 'python/sourcelist.cc')
| -rw-r--r-- | python/sourcelist.cc | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/python/sourcelist.cc b/python/sourcelist.cc index e42f6bb8..784b161e 100644 --- a/python/sourcelist.cc +++ b/python/sourcelist.cc @@ -21,7 +21,10 @@ // PkgsourceList Class /*{{{*/ // --------------------------------------------------------------------- -static char *doc_PkgSourceListFindIndex = "xxx"; +static char *doc_PkgSourceListFindIndex = + "find_index(pkgfile: apt_pkg.PackageFile) -> apt_pkg.IndexFile\n\n" + "Return the index file for the given package file, or None if none\n" + "could be found."; static PyObject *PkgSourceListFindIndex(PyObject *Self,PyObject *Args) { pkgSourceList *list = GetCpp<pkgSourceList*>(Self); @@ -47,7 +50,10 @@ static PyObject *PkgSourceListFindIndex(PyObject *Self,PyObject *Args) return Py_None; } -static char *doc_PkgSourceListReadMainList = "xxx"; +static char *doc_PkgSourceListReadMainList = + "read_main_list() -> bool\n\n" + "Read /etc/apt/sources.list and similar files to populate the list\n" + "of indexes."; static PyObject *PkgSourceListReadMainList(PyObject *Self,PyObject *Args) { pkgSourceList *list = GetCpp<pkgSourceList*>(Self); @@ -56,7 +62,11 @@ static PyObject *PkgSourceListReadMainList(PyObject *Self,PyObject *Args) return HandleErrors(PyBool_FromLong(res)); } -static char *doc_PkgSourceListGetIndexes = "Load the indexes into the fetcher"; +static char *doc_PkgSourceListGetIndexes = + "get_indexes(acquire: apt_pkg.Acquire[, all: bool=False]) -> bool\n\n" + "Add all indexes (i.e. stuff like Release files, Packages files)\n" + "to the Acquire object 'acquire'. If 'all' is True, all indexes\n" + "will be added, otherwise only changed indexes will be added."; static PyObject *PkgSourceListGetIndexes(PyObject *Self,PyObject *Args) { pkgSourceList *list = GetCpp<pkgSourceList*>(Self); @@ -110,6 +120,10 @@ static PyObject *PkgSourceListNew(PyTypeObject *type,PyObject *args,PyObject *kw return CppPyObject_NEW<pkgSourceList*>(NULL, type,new pkgSourceList()); } +static const char *sourcelist_doc = + "SourceList()\n\n" + "Represent the list of sources stored in /etc/apt/sources.list and\n" + "similar files."; PyTypeObject PySourceList_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) @@ -134,7 +148,7 @@ PyTypeObject PySourceList_Type = 0, // tp_as_buffer (Py_TPFLAGS_DEFAULT | // tp_flags Py_TPFLAGS_BASETYPE), - "pkgSourceList Object", // tp_doc + sourcelist_doc, // tp_doc 0, // tp_traverse 0, // tp_clear 0, // tp_richcompare |
