From 3b002163e11c39c15a286832ca8435513b449a36 Mon Sep 17 00:00:00 2001 From: Some Body Date: Sat, 25 Feb 2023 20:33:44 +0000 Subject: [PATCH] Unsuppress pylint E1101 no-member E1101 assignment-from-no-return was globally suppressed in pylint.rc Remove the suppression and instead suppress on a per-line basis. This protects future submissions from allowing this type of error. The per-line suppressions may be cleaned up in the future when the classes are refactored into their own files. These changes have no runtime impact. They are comments only. Test Plan: Pass: tox -e pylint Story: 2010531 Task: 47534 Signed-off-by: Al Bailey Change-Id: I07895bc5e9d6fb11d62a8da50e8b02835493aa76 --- .../nfv_common/strategy/_strategy_phase.py | 6 +++--- nfv/nfv-vim/nfv_vim/strategy/_strategy.py | 12 ++++++------ nfv/pylint.rc | 1 - 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/nfv/nfv-common/nfv_common/strategy/_strategy_phase.py b/nfv/nfv-common/nfv_common/strategy/_strategy_phase.py index 6e6f4434..760e206a 100755 --- a/nfv/nfv-common/nfv_common/strategy/_strategy_phase.py +++ b/nfv/nfv-common/nfv_common/strategy/_strategy_phase.py @@ -233,7 +233,7 @@ class StrategyPhase(object): Phase Save """ if self.strategy is not None: - self.strategy.phase_save() + self.strategy.phase_save() # pylint: disable=no-member else: DLOG.info("Strategy reference is invalid for phase (%s)." % self._name) @@ -456,7 +456,7 @@ class StrategyPhase(object): Strategy Stage Extend Timeout """ if self.strategy is not None: - self.strategy.phase_extend_timeout(self) + self.strategy.phase_extend_timeout(self) # pylint: disable=no-member else: self.refresh_timeouts() @@ -546,7 +546,7 @@ class StrategyPhase(object): """ DLOG.debug("Strategy Phase (%s) complete." % self._name) if self.strategy is not None: - self.strategy.phase_complete(self, result, reason) + self.strategy.phase_complete(self, result, reason) # pylint: disable=no-member else: DLOG.info("Strategy reference is invalid for phase (%s)." % self._name) return self._result, self._result_reason diff --git a/nfv/nfv-vim/nfv_vim/strategy/_strategy.py b/nfv/nfv-vim/nfv_vim/strategy/_strategy.py index fd611217..55ab0b7d 100755 --- a/nfv/nfv-vim/nfv_vim/strategy/_strategy.py +++ b/nfv/nfv-vim/nfv_vim/strategy/_strategy.py @@ -2262,7 +2262,7 @@ class FwUpdateStrategy(SwUpdateStrategy): self._state = strategy.STRATEGY_STATE.BUILD_FAILED self.build_phase.result = strategy.STRATEGY_PHASE_RESULT.FAILED self.build_phase.result_reason = "Worker " + msg - self.sw_update_obj.strategy_build_complete( + self.sw_update_obj.strategy_build_complete( # pylint: disable=no-member False, self.build_phase.result_reason) self.save() return @@ -2442,7 +2442,7 @@ class FwUpdateStrategy(SwUpdateStrategy): self.build_phase.result = strategy.STRATEGY_PHASE_RESULT.FAILED self.build_phase.result_reason = 'active alarms present ; ' self.build_phase.result_reason += alarm_id_list - self.sw_update_obj.strategy_build_complete( + self.sw_update_obj.strategy_build_complete( # pylint: disable=no-member False, self.build_phase.result_reason) self.save() return @@ -2453,7 +2453,7 @@ class FwUpdateStrategy(SwUpdateStrategy): DLOG.warn(self.build_phase.result_reason) self._state = strategy.STRATEGY_STATE.BUILD_FAILED self.build_phase.result = strategy.STRATEGY_PHASE_RESULT.FAILED - self.sw_update_obj.strategy_build_complete( + self.sw_update_obj.strategy_build_complete( # pylint: disable=no-member False, self.build_phase.result_reason) self.save() return @@ -2478,15 +2478,15 @@ class FwUpdateStrategy(SwUpdateStrategy): self.build_phase.result = \ strategy.STRATEGY_PHASE_RESULT.FAILED self.build_phase.result_reason = reason - self.sw_update_obj.strategy_build_complete( + self.sw_update_obj.strategy_build_complete( # pylint: disable=no-member False, self.build_phase.result_reason) self.save() return else: - self.sw_update_obj.strategy_build_complete( + self.sw_update_obj.strategy_build_complete( # pylint: disable=no-member False, self.build_phase.result_reason) - self.sw_update_obj.strategy_build_complete(True, '') + self.sw_update_obj.strategy_build_complete(True, '') # pylint: disable=no-member self.save() def from_dict(self, diff --git a/nfv/pylint.rc b/nfv/pylint.rc index 17f8d5a3..67a2403c 100755 --- a/nfv/pylint.rc +++ b/nfv/pylint.rc @@ -99,7 +99,6 @@ disable= W1514, # unspecified-encoding W0237, # arguments-renamed W4905, # deprecated-decorator - E1101, # no-member E1121 # too-many-function-args [REPORTS]