Remove no longer needed pylint ignores.

This commit is contained in:
Felix Fontein 2025-10-25 01:22:46 +02:00
parent 331e661424
commit 4a9ec3e307
2 changed files with 4 additions and 5 deletions

View File

@ -385,12 +385,10 @@ disable=raw-checker-failed,
import-error, # TODO figure out why pylint cannot find the module
no-member,
no-name-in-module, # TODO figure out why pylint cannot find the module
not-an-iterable, # TODO: needs better typing info
protected-access,
redefined-outer-name, # needed for test fixtures
subprocess-popen-preexec-fn,
unexpected-keyword-arg,
unsupported-assignment-operation, # TODO: needs better typing info
unused-argument,
# Cannot remove yet due to inadequacy of rules
inconsistent-return-statements, # doesn't notice that fail_json() does not return

View File

@ -237,11 +237,12 @@ class SwarmNodeManager(DockerBaseClass):
node_spec["Labels"] = self.parameters.labels
changed = True
elif self.parameters.labels_state == "merge":
node_spec["Labels"] = dict(node_info["Spec"]["Labels"] or {})
labels: dict[str, str] = dict(node_info["Spec"]["Labels"] or {})
node_spec["Labels"] = labels
if self.parameters.labels is not None:
for key, value in self.parameters.labels.items():
if node_spec["Labels"].get(key) != value:
node_spec["Labels"][key] = value
if labels.get(key) != value:
labels[key] = value
changed = True
if self.parameters.labels_to_remove is not None: