public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v1 pve-esxi-import-tools 0/5] Type Checking Improvements
@ 2025-07-18 16:19 Max R. Carrara
  2025-07-18 16:19 ` [pve-devel] [PATCH v1 pve-esxi-import-tools 1/5] listvms: respect new type hints of pyVmomi package Max R. Carrara
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Max R. Carrara @ 2025-07-18 16:19 UTC (permalink / raw)
  To: pve-devel

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



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-07-22 20:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-18 16:19 [pve-devel] [PATCH v1 pve-esxi-import-tools 0/5] Type Checking Improvements Max R. Carrara
2025-07-18 16:19 ` [pve-devel] [PATCH v1 pve-esxi-import-tools 1/5] listvms: respect new type hints of pyVmomi package Max R. Carrara
2025-07-18 16:19 ` [pve-devel] [PATCH v1 pve-esxi-import-tools 2/5] listvms: s/EsxiConnectonArgs/EsxiConnectionArgs Max R. Carrara
2025-07-18 16:19 ` [pve-devel] [PATCH v1 pve-esxi-import-tools 3/5] listvms: run formatter Max R. Carrara
2025-07-18 16:19 ` [pve-devel] [PATCH v1 pve-esxi-import-tools 4/5] d/control: add python3-pyvmomi (>= 8) as build dependency Max R. Carrara
2025-07-18 16:19 ` [pve-devel] [PATCH v1 pve-esxi-import-tools 5/5] .gitignore: ignore .lint-incremental Max R. Carrara
2025-07-22 20:14 ` [pve-devel] [PATCH v1 pve-esxi-import-tools 0/5] Type Checking Improvements Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal