pycodestyle: Module level import not at top of file
Changes:
- Added NOQA on python files import to skip CI
- Fix import order reported by CI.
Tested:
- CI will catch this if there is error
Change-Id: I39a11d3e815a08488671ed948f073828e19aee37
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/bin/generate_inventory b/bin/generate_inventory
index 3654682..0d90343 100755
--- a/bin/generate_inventory
+++ b/bin/generate_inventory
@@ -10,7 +10,7 @@
lib_path = sys.path[0] + "/../lib"
sys.path.insert(0, lib_path)
-from gen_print import *
+from gen_print import * # NOQA
# This list will be longer when more development codes are available.
inventory_items = ['fru', 'core', 'fan', 'fan_wc', 'gpu']
diff --git a/bin/generate_testsuite_info.py b/bin/generate_testsuite_info.py
index 7cafd1e..4a2f115 100755
--- a/bin/generate_testsuite_info.py
+++ b/bin/generate_testsuite_info.py
@@ -10,9 +10,9 @@
from robot.parsing.model import TestData
sys.path.append(os.path.join(os.path.dirname(__file__), "../lib"))
-from gen_arg import *
-from gen_print import *
-from gen_valid import *
+from gen_arg import * # NOQA
+from gen_print import * # NOQA
+from gen_valid import * # NOQA
# Set exit_on_error for gen_valid functions.
set_exit_on_error(True)
diff --git a/bin/obmc_ser_num b/bin/obmc_ser_num
index ba620c8..4057316 100755
--- a/bin/obmc_ser_num
+++ b/bin/obmc_ser_num
@@ -11,9 +11,9 @@
save_path_0 = sys.path[0]
del sys.path[0]
-from gen_arg import *
-from gen_print import *
-from gen_valid import *
+from gen_arg import * # NOQA
+from gen_print import * # NOQA
+from gen_valid import * # NOQA
# Restore sys.path[0].
sys.path.insert(0, save_path_0)
diff --git a/bin/print_ffdc_functions b/bin/print_ffdc_functions
index dd46bc6..7988195 100755
--- a/bin/print_ffdc_functions
+++ b/bin/print_ffdc_functions
@@ -9,10 +9,10 @@
save_path_0 = sys.path[0]
del sys.path[0]
-from gen_arg import *
-from gen_print import *
-from gen_valid import *
-from openbmc_ffdc_list import *
+from gen_arg import * # NOQA
+from gen_print import * # NOQA
+from gen_valid import * # NOQA
+from openbmc_ffdc_list import * # NOQA
# Restore sys.path[0].
sys.path.insert(0, save_path_0)
diff --git a/bin/prop_call.py b/bin/prop_call.py
index 15cff57..e352d55 100755
--- a/bin/prop_call.py
+++ b/bin/prop_call.py
@@ -22,11 +22,11 @@
save_path_0 = sys.path[0]
del sys.path[0]
-from gen_arg import *
-from gen_print import *
-from gen_valid import *
-from gen_misc import *
-from gen_cmd import *
+from gen_arg import * # NOQA
+from gen_print import * # NOQA
+from gen_valid import * # NOQA
+from gen_misc import * # NOQA
+from gen_cmd import * # NOQA
# Restore sys.path[0].
sys.path.insert(0, save_path_0)
diff --git a/bin/validate_plug_ins.py b/bin/validate_plug_ins.py
index a202d2e..8e3ed1d 100755
--- a/bin/validate_plug_ins.py
+++ b/bin/validate_plug_ins.py
@@ -1,12 +1,12 @@
#!/usr/bin/env python3
+import os
import sys
try:
import __builtin__
except ImportError:
import builtins as __builtin__
-import os
# python puts the program's directory path in sys.path[0]. In other words, the user ordinarily has no way
# to override python's choice of a module from its own dir. We want to have that ability in our environment.
@@ -17,9 +17,9 @@
save_path_0 = sys.path[0]
del sys.path[0]
-from gen_print import *
-from gen_arg import *
-from gen_plug_in import *
+from gen_print import * # NOQA
+from gen_arg import * # NOQA
+from gen_plug_in import * # NOQA
# Restore sys.path[0].
sys.path.insert(0, save_path_0)
diff --git a/bin/websocket_monitor.py b/bin/websocket_monitor.py
index 846ccd5..3425057 100755
--- a/bin/websocket_monitor.py
+++ b/bin/websocket_monitor.py
@@ -14,9 +14,9 @@
save_path_0 = sys.path[0]
del sys.path[0]
-from gen_print import *
-from gen_arg import *
-from gen_valid import *
+from gen_print import * # NOQA
+from gen_arg import * # NOQA
+from gen_valid import * # NOQA
# Restore sys.path[0].
sys.path.insert(0, save_path_0)