Unsuppress pylint E1111 assignment-from-no-return

E1111 assignment-from-no-return had being suppressed in pylint.rc
and now is no longer being suppressed.
This allows future code changes to be validated against this check.

- the kubernetes client was suppressing the incorrect code as part of a
workaround to support 'None' names.
- A unit test was incorrectly assigning the result of a method call and
has been updated.

These changes have no runtime impact.

Test Plan:
  Pass: tox -e pylint

Story: 2010531
Task: 47344
Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I4c2a5ce60c0ceef4328af8ccedcd1e71b1d42330
This commit is contained in:
Al Bailey 2023-02-11 11:34:07 -05:00
parent 319d78f0dc
commit d42b8694d1
3 changed files with 6 additions and 11 deletions

View File

@ -29,11 +29,8 @@ DLOG = debug.debug_get_logger('nfv_plugins.nfvi_plugins.clients.kubernetes_clien
# in the python Kubernetes client to bypass the "none image"
# check because the error is not from kubernetes.
#
# This workaround should be removed if the proposed solutions
# can be made in kubernetes or a workaround can be implemented
# in containerd.
# https://github.com/kubernetes/kubernetes/pull/79018
# https://github.com/containerd/containerd/issues/4771
# This workaround should be removed when we update to
# kubernetes client v22
def names(self, names):
"""Monkey patch V1ContainerImage with this to set the names."""
self._names = names
@ -41,7 +38,7 @@ def names(self, names):
# Replacing address of "names" in V1ContainerImage
# with the "names" defined above
V1ContainerImage.names = V1ContainerImage.names.setter(names) # pylint: disable=no-member
V1ContainerImage.names = V1ContainerImage.names.setter(names) # pylint: disable=assignment-from-no-return
def get_client():

View File

@ -46,5 +46,5 @@ class TestDebugConfig(testcase.NFVTestCase):
self.assertEqual(Debug()._debug_level, DEBUG_LEVEL.VERBOSE)
# call reload_config to undo the local modification
config = debug.debug_reload_config()
debug.debug_reload_config()
self.assertNotEqual(Debug()._debug_level, DEBUG_LEVEL.VERBOSE)

View File

@ -100,7 +100,6 @@ disable=
W0237, # arguments-renamed
W4905, # deprecated-decorator
E1101, # no-member
E1111, # assignment-from-no-return
E1121 # too-many-function-args
[REPORTS]
@ -277,6 +276,5 @@ valid-classmethod-first-arg=cls
[EXCEPTIONS]
# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception
# Exceptions that will emit a warning when caught.
overgeneral-exceptions=builtins.BaseException,builtins.Exception