From 7a028a29c0894a402284e6fb2970c2adcc73448b Mon Sep 17 00:00:00 2001 From: Bernardo Decco Date: Mon, 27 Sep 2021 09:47:29 -0300 Subject: [PATCH] Re-enable important py3k checks for monitoring Re-enabling some of the disabled tox warnings present on the pylint.rc file Re-enabling: W1638: range-builtin-not-iterating W1636: map-builtin-not-iterating Test Plan: Sanity test run on AIO-SX: PASS: test_system_health_pre_session[pods] PASS: test_system_health_pre_session[alarms] PASS: test_system_health_pre_session[system_apps] PASS: test_wr_analytics[deploy_and_remove] PASS: test_horizon_host_inventory_display PASS: test_lock_unlock_host[controller] PASS: test_pod_to_pod_connection PASS: test_pod_to_service_connection PASS: test_host_to_service_connection Story: 2006796 Task: 43443 Signed-off-by: Bernardo Decco Change-Id: I6c13ae171ee4a41377dad55ed3c519ee710b4d88 --- kube-cpusets/kube-cpusets/kube_cpusets/kube_cpusets.py | 3 ++- kube-cpusets/kube-cpusets/pylint.rc | 5 +---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/kube-cpusets/kube-cpusets/kube_cpusets/kube_cpusets.py b/kube-cpusets/kube-cpusets/kube_cpusets/kube_cpusets.py index 4e55912..f583431 100755 --- a/kube-cpusets/kube-cpusets/kube_cpusets/kube_cpusets.py +++ b/kube-cpusets/kube-cpusets/kube_cpusets/kube_cpusets.py @@ -64,7 +64,8 @@ def range_to_list(csv_range=None): """ if not csv_range: return [] - ranges = [(lambda L: range(L[0], L[-1] + 1))(map(int, r.split('-'))) + ranges = [(lambda L: list(range(L[0], L[-1] + 1))) + (list(map(int, r.split('-')))) for r in csv_range.split(',')] return [y for x in ranges for y in x] diff --git a/kube-cpusets/kube-cpusets/pylint.rc b/kube-cpusets/kube-cpusets/pylint.rc index 6d6e722..a23b006 100644 --- a/kube-cpusets/kube-cpusets/pylint.rc +++ b/kube-cpusets/kube-cpusets/pylint.rc @@ -137,10 +137,7 @@ enable=E1603,E1609,E1610,E1602,E1606,E1608,E1607,E1605,E1604,E1601,E1611,W1652, # R0915: Too many statements # Disable Python3 checkers: # W1618: no-absolute-import -# W1636: map-builtin-not-iterating -# W1638: range-builtin-not-iterating -disable=C0103, C0111, C0325, C0330, R0912, R0914, R0915, W0703, W1618, W1636, - W1638 +disable=C0103, C0111, C0325, C0330, R0912, R0914, R0915, W0703, W1618 [REPORTS]