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 <robert.church@windriver.com>
This commit is contained in:
Robert Church 2020-04-28 01:53:10 -04:00
parent e61f896475
commit ae66f40278

View File

@ -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):