Fix pylint part 1
[csit.git] / resources / libraries / python / autogen / Regenerator.py
index e7e0370..7a57676 100644 (file)
@@ -16,7 +16,6 @@
 from glob import glob
 from os import getcwd
 
-from .Testcase import Testcase
 from .DefaultTestcase import DefaultTestcase
 
 
@@ -63,6 +62,13 @@ class Regenerator(object):
         }
 
         def get_iface_and_suite_id(filename):
+            """Get interface and suite ID.
+
+            :param filename: Suite file.
+            :type filename: str
+            :returns: Interface ID, Suite ID.
+            :rtype: tuple
+            """
             dash_split = filename.split("-", 1)
             if len(dash_split[0]) <= 4:
                 # It was something like "2n1l", we need one more split.
@@ -70,12 +76,38 @@ class Regenerator(object):
             return dash_split[0], dash_split[1].split(".", 1)[0]
 
         def add_testcase(testcase, iface, file_out, num, **kwargs):
+            """Add testcase to file.
+
+            :param testcase: Testcase class.
+            :param iface: Interface.
+            :param file_out: File to write testcases to.
+            :param num: Testcase number.
+            :param kwargs: Key-value pairs used to construct testcase.
+            :type testcase: Testcase
+            :type iface: str
+            :type file_out: file
+            :type num: int
+            :type kwargs: dict
+            :returns: Next testcase number.
+            :rtype: int
+            """
             # TODO: Is there a better way to disable some combinations?
             if kwargs["framesize"] != 9000 or "vic1227" not in iface:
                 file_out.write(testcase.generate(num=num, **kwargs))
             return num + 1
 
         def add_testcases(testcase, iface, file_out, tc_kwargs_list):
+            """Add testcases to file.
+
+            :param testcase: Testcase class.
+            :param iface: Interface.
+            :param file_out: File to write testcases to.
+            :param tc_kwargs_list: Key-value pairs used to construct testcase.
+            :type testcase: Testcase
+            :type iface: str
+            :type file_out: file
+            :type tc_kwargs_list: dict
+            """
             num = 1
             for tc_kwargs in tc_kwargs_list:
                 num = add_testcase(testcase, iface, file_out, num, **tc_kwargs)