vmware / vmware/pyvmomi

Type stubs are not compatible with Python type checkers like mypy

Open
#1,048 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
2.3k
Forks
763
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.

The type coverage of modules in pyVmomi is now pretty good, but pyVim modules are still missing type stubs. FWIW both packages are part of this repository and shipped wth the pyvmomi PyPI package.

Right now mypy prints following errors when I use it:

error: Skipping analyzing "pyVim.connect": module is installed, but missing library stubs or py.typed marker [import-untyped]
error: Skipping analyzing "pyVim.task": module is installed, but missing library stubs or py.typed marker [import-untyped]

Describe the solution you'd like

Please add type hints and py.typed marker file.

Describe alternatives you've considered

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inventorying the pyVim modules, especially pyVim.connect and pyVim.task, and check how existing pyVmomi type stubs are organized. Add type hints for the pyVim package and the requested py.typed marker, then run mypy against imports of these modules to confirm the missing-stub errors are resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.