Invalid automatic type import
Open
@DanielDraganov is already working on this.
Since Jun 21, 2023.
bug
- Dominant language
- Python
- Stars
- 2.3k
- Forks
- 763
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
When trying to import using PyCharm, using for example VirtualMachine, it imports pyVmomi.vim.VirtualMachine, but the correct import is vim.VirtualMachine. This causes errors during runtime.
Reproduction steps
-
Try to import some type automatically
-
Run the code and get error:
ImportError: cannot import name 'VirtualMachine' from 'pyVmomi.vim' (unknown location)
Expected behavior
Import would be correct: from vim import VirtualMachine
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.