From 936ca3d5ecbe3444a88e9be0ce634c9e2b1fefe8 Mon Sep 17 00:00:00 2001 From: Eric Barrett Date: Wed, 20 Mar 2019 15:28:03 -0400 Subject: [PATCH] Enable Python3 Incompatible Print Flake8 Error Flake8 currently ignores python3.x incompatible use of print operator Enable H233 for more thorough testing of code Change-Id: I77d6bdb4f792a832f04bbf8bd73a9ae3532633ff Story: 2004515 Task: 30076 Signed-off-by: Eric Barrett --- .../storage_topology/exec/storage_topology.py | 4 ++-- tox.ini | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/storage-topology/storage-topology/storage_topology/exec/storage_topology.py b/tools/storage-topology/storage-topology/storage_topology/exec/storage_topology.py index c7e20bcc6..1baac9e5b 100644 --- a/tools/storage-topology/storage-topology/storage_topology/exec/storage_topology.py +++ b/tools/storage-topology/storage-topology/storage_topology/exec/storage_topology.py @@ -199,7 +199,7 @@ def print_disk_view(rows=None, extended=False): 'VG (name:state)'] if len(rows) > 0: - print + print() print("DISKs: (Physical disk view)") pt = PrettyTable(disk_lables_extended) if extended else \ @@ -227,7 +227,7 @@ def print_vg_view(rows=None, extended=False): 'Current PVs', 'PV List (name:state)', 'VG Parameters'] if len(rows) > 0: - print + print() print("VOLUME GROUPS: (VG view)") pt = PrettyTable(vg_labels_extended) if extended else \ diff --git a/tox.ini b/tox.ini index 76473ff38..7e9015c9a 100644 --- a/tox.ini +++ b/tox.ini @@ -70,7 +70,6 @@ commands = # H102 is apache license # H104: File contains nothing but comments # H201: no 'except:' at least use 'except Exception:' -# H233: Python 3.x incompatible use of print operator # H237: module exception is removed in Python 3 # H238: old style class declaration, use new style # H306: imports not in alphabetical order @@ -92,7 +91,7 @@ commands = # F841 local variable '_alarm_state' is assigned to but never used ignore = E121,E123,E124,E125,E126,E127,E128,E201,E202,E203,E211,E221,E222,E225,E226,E231,E251,E261,E265,E266, E302,E303,E305,E402,E501,E711,E722,E741, - H101,H102,H104,H201,H238,H233,H237,H306,H401,H404,H405, + H101,H102,H104,H201,H238,H237,H306,H401,H404,H405, W191,W291,W391,W503, B001,B007,B301,B306, F401,F841