[pve-devel] [PATCH v1 pve-esxi-import-tools 0/5] Type Checking Improvements
Max R. Carrara
m.carrara at proxmox.com
Fri Jul 18 18:19:00 CEST 2025
Type Checking Improvements - v1
===============================
The pyVmomi (python3-pyvmomi) package received a bunch of new type stubs
in trixie. This series adds explicit type hints where applicable. Note
that because pyVmomi uses a lot of `Optional[Something]` types, which is
quite a nuisance to handle in this regard (as you'll see in patch 01).
Because of these new type stubs we no longer have to ignore missing
imports regarding pyVmomi in mypy.ini and can add it as a build
dependency for mypy's sake. This also eliminates any quirks around mypy
not linting anything regarding pyVmomi types if python3-pyvmomi isn't
installed.
Gave the script a quick smoke test by calling it directly towards a
local ESXi instance I still had lying around to check if I didn't break
anything by accident.
Summary of Changes
------------------
Max R. Carrara (5):
listvms: respect new type hints of pyVmomi package
listvms: s/EsxiConnectonArgs/EsxiConnectionArgs
listvms: run formatter
d/control: add python3-pyvmomi (>= 8) as build dependency
.gitignore: ignore .lint-incremental
.gitignore | 1 +
debian/control | 1 +
listvms.py | 114 +++++++++++++++++++++++++++++++++++++++----------
mypy.ini | 3 --
4 files changed, 94 insertions(+), 25 deletions(-)
--
2.39.5
More information about the pve-devel
mailing list