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

Typing: VirtualMachine optional fields #1074

Open
IvarVirusiim opened this issue May 28, 2024 · 0 comments
Open

Typing: VirtualMachine optional fields #1074

IvarVirusiim opened this issue May 28, 2024 · 0 comments
Labels

Comments

@IvarVirusiim
Copy link

IvarVirusiim commented May 28, 2024

Describe the bug

Type hints for the VirtualMachine object aren't correct. The following fields should be optional (according to the documentation):

  • config
  • datastore
  • guest
  • layout
  • layoutEx
  • network
  • parentVApp
  • resourceConfig
  • resourcePool
  • rootSnapshot
  • snapshot
  • storage

Reproduction steps

Look at VirtualMachine object type hints.

vm: vim.VirtualMachine

... (logic for fetching VM)

config: vim.vm.ConfigInfo | None = vm.config (<- is not 100% correct, because vm.config type hint is just vim.vm.ConfigInfo)

Expected behavior

Type hints are shown as optional for those fields.

Additional context

Documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant