From d590d6c7051a9d9941900efc85959e9158609e08 Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Wed, 8 Jun 2022 14:45:51 +0000 Subject: [PATCH] Fix new pylint issues The new pylint release removed a few rule sets and added a check for generators. This patch updates Octavia for those changes. Change-Id: I2261342377e7acb1d2bc4fc742a351dfc66e4305 --- .pylintrc | 5 ----- octavia/amphorae/backends/agent/api_server/amphora_info.py | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.pylintrc b/.pylintrc index cf6899a117..0618222a64 100644 --- a/.pylintrc +++ b/.pylintrc @@ -20,11 +20,9 @@ disable= anomalous-backslash-in-string, arguments-differ, attribute-defined-outside-init, - bad-builtin, broad-except, fixme, global-statement, - no-init, pointless-string-statement, protected-access, redefined-builtin, @@ -35,15 +33,12 @@ disable= unused-variable, useless-super-delegation, # "C" Coding convention violations - bad-continuation, invalid-name, line-too-long, missing-docstring, consider-using-f-string, # "R" Refactor recommendations duplicate-code, - interface-not-implemented, - no-self-use, too-few-public-methods, too-many-ancestors, too-many-arguments, diff --git a/octavia/amphorae/backends/agent/api_server/amphora_info.py b/octavia/amphorae/backends/agent/api_server/amphora_info.py index c1100f2060..7a9dda2b50 100644 --- a/octavia/amphorae/backends/agent/api_server/amphora_info.py +++ b/octavia/amphorae/backends/agent/api_server/amphora_info.py @@ -149,7 +149,7 @@ class AmphoraInfo(object): 'iowait': vals[6], 'irq': vals[7], 'softirq': vals[8], - 'total': sum([int(i) for i in vals[2:]]) + 'total': sum(int(i) for i in vals[2:]) } def _load(self):