#1178 cli: document parse_arches method parameters
Merged 5 years ago by mikem. Opened 5 years ago by ktdreyer.
ktdreyer/koji doc-parse-arches  into  master

file modified
+12 -2
@@ -141,8 +141,18 @@ 

  

  

  def parse_arches(arches, to_list=False):

-     """Parse comma or space-separated list of arches and return

-        only space-separated one."""

+     """Normalize user input for a list of arches.

+ 

+     This method parses a single comma- or space-separated string of arches and

+     returns a space-separated string.

+ 

+     :param str arches: comma- or space-separated string of arches, eg.

+                        "x86_64,ppc64le", or "x86_64 ppc64le"

+     :param bool to_list: return a list of each arch, instead of a single

+                          string. This is False by default.

+     :returns: a space-separated string like "x86_64 ppc64le", or a list like

+               ['x86_64', 'ppc64le'].

+     """

      arches = arches.replace(',', ' ').split()

      if to_list:

          return arches

Document the parameters for the parse_arches() method.

Commit 91a4011 fixes this pull-request

Pull-Request has been merged by mikem

5 years ago