From ae66f40278142252182b53dc92baf32ee5c10d1f Mon Sep 17 00:00:00 2001 From: Robert Church Date: Tue, 28 Apr 2020 01:53:10 -0400 Subject: [PATCH] Fix storage topology pylint 2.5.0 error pylint 2.5.0 was recently introduced with: - Added a new warning, 'unsupported-assignment-operation', which is emitted when item assignment is tried on an object which doesn't have this ability. Closes issue #591. Looking at the implementation of prettytable, this appears to be a false positive. Disable the check via pragma. Change-Id: Iebaee525e2af958ca4f877be40768641391c2525 Signed-off-by: Robert Church --- .../storage_topology/exec/storage_topology.py | 8 ++++---- 1 file changed, 4 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 6644876c9..b920aeb48 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 @@ -200,8 +200,8 @@ def print_disk_view(rows=None, extended=False): pt = PrettyTable(disk_lables_extended) if extended else \ PrettyTable(disk_lables_brief) - pt.align = 'l' - pt.align['Size'] = 'r' + pt.align = 'l' # pylint: disable=unsupported-assignment-operation + pt.align['Size'] = 'r' # pylint: disable=unsupported-assignment-operation for r in rows: if len(r) == len(pt.field_names): pt.add_row(r) @@ -227,9 +227,9 @@ def print_vg_view(rows=None, extended=False): pt = PrettyTable(vg_labels_extended) if extended else \ PrettyTable(vg_labels_brief) - pt.align = 'l' + pt.align = 'l' # pylint: disable=unsupported-assignment-operation for C in ['VG Size', 'Current LVs', 'Current PVs']: - pt.align[C] = 'r' + pt.align[C] = 'r' # pylint: disable=unsupported-assignment-operation for r in rows: if len(r) == len(pt.field_names):