Python code modernization, 5/n (#1165)

* Address raise-missing-from.

* Address simplifiable-if-expression.

* Address unnecessary-dunder-call.

* Address unnecessary-pass.

* Address use-list-literal.

* Address unused-variable.

* Address use-dict-literal.
This commit is contained in:
Felix Fontein
2025-10-12 16:02:27 +02:00
committed by GitHub
parent cad22de628
commit c75aa5dd64
66 changed files with 1549 additions and 1429 deletions
+1 -1
View File
@@ -132,7 +132,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
try:
self.docker_machine_path = get_bin_path("docker-machine")
except ValueError as e:
raise AnsibleError(to_native(e))
raise AnsibleError(to_native(e)) from e
command = [self.docker_machine_path]
command.extend(args)