Fix some new pylint "R" warnings

After updating pylint, it started emitting additional "R"
warnings in some cases, fix some of them.

  use-a-generator,
  unnecessary-lambda-assignment,
  consider-using-max-builtin,
  consider-using-generator,
  consider-using-in,
  use-list-literal,
  consider-using-from-import

Trivialfix

Change-Id: Ife6565cefcc30b4e8a0df9121c9454cf744225df
This commit is contained in:
Brian Haley
2023-05-09 22:41:01 -04:00
parent ed274efcf7
commit 929b383743
22 changed files with 68 additions and 53 deletions

View File

@@ -177,8 +177,7 @@ def _get_rpc_workers(plugin=None):
if workers is None:
# By default, half as many rpc workers as api workers
workers = int(_get_api_workers() / 2)
if workers < 1:
workers = 1
workers = max(workers, 1)
# If workers > 0 then start_rpc_listeners would be called in a
# subprocess and we cannot simply catch the NotImplementedError. It is