Re: [PATCH] Add documentation to the dm and dmraid pythong bindings. As well as to the

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Disclaimer: I'm not familiar with the code I just reviewed!

Joel Granados Moreno wrote:

<snip>

+	{"targets", (PyCFunction)pydm_targets, METH_NOARGS,
+		"Scans for suppoerted targets.  It does not expect any args.  "
+		"It returns a list of target objects."},

typo / spelling: "suppoerted" -> supported


 	{NULL, NULL}
 };
diff --git a/dmraid.c b/dmraid.c
index e693512..3100768 100644
--- a/dmraid.c
+++ b/dmraid.c
@@ -265,10 +265,12 @@ pydmraid_dev_scanparts(PyObject *self, PyObject *args, PyObject *kwds)
 static struct PyMethodDef pydmraid_dev_methods[] = {
 	{"rmpart",
 		(PyCFunction)pydmraid_dev_rmpart,
-		METH_VARARGS | METH_KEYWORDS},
+		METH_VARARGS | METH_KEYWORDS,
+		"Removes the partition devined by the partno argument"},

typo / spelling: "devined" -> defined

 	{"scanparts",
 		(PyCFunction)pydmraid_dev_scanparts,
-		METH_NOARGS},
+		METH_NOARGS,
+		"(Re)scans all partition for the current device"},

typo / spelling: "partition" -> partitions

@@ -1309,16 +1314,20 @@ out:
 static struct PyMethodDef pydmraid_ctx_methods[] = {
 	{"discover_disks",
 		(PyCFunction)pydmraid_ctx_discover_disks,
-		METH_VARARGS | METH_KEYWORDS},
+		METH_VARARGS | METH_KEYWORDS,
+		"Discover all disks in the system"},
 	{"discover_raiddevs",
 		(PyCFunction)pydmraid_ctx_discover_raiddevs,
-		METH_VARARGS | METH_KEYWORDS},
+		METH_VARARGS | METH_KEYWORDS,
+		"Identifies which disks are part of a raid set"},
 	{"discover_raidsets",
 		(PyCFunction)pydmraid_ctx_discover_raidsets,
-		METH_NOARGS},
+		METH_NOARGS,
+		"Discovers the raid sets in the system"},
 	{"get_raidsets",
 		(PyCFunction)pydmraid_ctx_get_raidsets,
-		METH_VARARGS | METH_KEYWORDS},
+		METH_VARARGS | METH_KEYWORDS,
+		"Returns a list of all the raid sets in the system"},
 	{NULL},
 };


I see that 3 of these methods take args, I think you should document which args and what they do.

Regards,

Hans

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux