From e635ae442132a7e3bab75796d2ac0b66bd289bdb Mon Sep 17 00:00:00 2001
From: Marcus Müller <marcus.mueller@ettus.com>
Date: Tue, 6 Mar 2018 12:44:36 +0100
Subject: runtime: py_io_signature method documentation

Only moved code comments to become docstrings.
---
 gnuradio-runtime/python/gnuradio/gr/gateway.py | 40 +++++++++++++++-----------
 1 file changed, 23 insertions(+), 17 deletions(-)

(limited to 'gnuradio-runtime/python/gnuradio/gr/gateway.py')

diff --git a/gnuradio-runtime/python/gnuradio/gr/gateway.py b/gnuradio-runtime/python/gnuradio/gr/gateway.py
index 9c6a5fcd9b..8f4b930fd2 100644
--- a/gnuradio-runtime/python/gnuradio/gr/gateway.py
+++ b/gnuradio-runtime/python/gnuradio/gr/gateway.py
@@ -81,36 +81,42 @@ class msg_handler(gr.feval_p):
 # io_signature for Python
 ########################################################################
 class py_io_signature(object):
-    """Describes the type/number of ports for block input or output.
-
-    Args:
-
-    min_ports (int): mininum number of connected ports.
-
-    max_ports (int): maximum number of connected ports. -1 indicates
-    no limit.
-
-    type_list (list[str]): numpy type names for each port. If the
-    number of connected ports is greater than the number of types
-    provided, the last type in the list is repeated.
+    """
+    Describes the type/number of ports for block input or output.
     """
 
     # Minimum and maximum number of ports, and a list of numpy types.
     def __init__(self, min_ports, max_ports, type_list):
+        """
+        Args:
+
+        min_ports (int): mininum number of connected ports.
+
+        max_ports (int): maximum number of connected ports. -1 indicates
+        no limit.
+
+        type_list (list[str]): numpy type names for each port. If the
+        number of connected ports is greater than the number of types
+        provided, the last type in the list is repeated.
+        """
         self.__min_ports = min_ports
         self.__max_ports = max_ports
         self.__types = map(numpy.dtype, type_list)
 
-    # Make/return a gr.io_signature. A non-empty list of sizes is
-    # required, even if there are no ports.
     def gr_io_signature(self):
+        """
+        Make/return a gr.io_signature. A non-empty list of sizes is
+        required, even if there are no ports.
+        """
         return io_signaturev(self.__min_ports, self.__max_ports,
                              [t.itemsize for t in self.__types] or [0])
 
-    # Return data types for the first nports ports. If nports is
-    # smaller than the provided type list, return a truncated list. If
-    # larger, fill with the last type.
     def port_types(self, nports):
+        """
+        Return data types for the first nports ports. If nports is
+        smaller than the provided type list, return a truncated list. If
+        larger, fill with the last type.
+        """
         ntypes = len(self.__types)
         if ntypes == 0:
             return ()
-- 
cgit v1.2.3