Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type stubs are not compatible with Python type checkers like mypy #1048

Open
intgr opened this issue Sep 15, 2023 · 1 comment
Open

Type stubs are not compatible with Python type checkers like mypy #1048

intgr opened this issue Sep 15, 2023 · 1 comment

Comments

@intgr
Copy link

intgr commented Sep 15, 2023

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

@karaatanassov
Copy link

There seem to be a number of issues with type validation in Python say with mypy. Optional[] does not seem to be use at all in declarations as noted in #1056

I am changing the subject and will close related issues as duplicates of this one.

Type stubs need to be compatible with Python type checkers.

@karaatanassov karaatanassov changed the title Type stubs: Missing types in pyVim package Type stubs are not compatible with Python type checkers like mypy Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants