[pve-devel] [PATCH v1 pve-esxi-import-tools 3/5] listvms: run formatter
Max R. Carrara
m.carrara at proxmox.com
Fri Jul 18 18:19:03 CEST 2025
Like in 1563eddb, run `black -l 80` [0], even though we don't have an
official style guide for Python. This is just to keep the code looking
consistent.
[0]: https://github.com/psf/black
Signed-off-by: Max R. Carrara <m.carrara at proxmox.com>
---
listvms.py | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/listvms.py b/listvms.py
index 710ac5e..a718c41 100755
--- a/listvms.py
+++ b/listvms.py
@@ -31,9 +31,9 @@ def parse_args() -> argparse.Namespace:
parser.add_argument(
"--port",
type=int,
- metavar='PORT',
+ metavar="PORT",
default=443,
- help="Use a port other than 443."
+ help="Use a port other than 443.",
)
parser.add_argument(
@@ -320,9 +320,11 @@ def is_vcls_agent_vm(vm: vim.VirtualMachine) -> bool:
if vm.config is None:
return False
- return any(cfg.key == "HDCS.agent"
- and cfg.value.lower() == "true"
- for cfg in vm.config.extraConfig)
+ return any(
+ cfg.key == "HDCS.agent" and cfg.value.lower() == "true"
+ for cfg in vm.config.extraConfig
+ )
+
def is_diskless_vm(vm: vim.VirtualMachine) -> bool:
if vm.config is None or vm.config.files is None:
@@ -332,6 +334,7 @@ def is_diskless_vm(vm: vim.VirtualMachine) -> bool:
return not datastore_name
+
def main():
args = parse_args()
--
2.39.5
More information about the pve-devel
mailing list