vmware / pyvmomi

VMware vSphere API Python Bindings
Apache License 2.0
2.19k stars 766 forks source link

Syntax error in vim/__init__pyi #1015

Closed IvarVirusiim closed 1 year ago

IvarVirusiim commented 1 year ago

Describe the bug

pyvmomi = "8.0.1.0"

File: pyVmomi/vim/__init__.pyi:1117

class HostSystem(ManagedEntity):
...

    class StandbyMode(Enum):
        entering = "entering"
        exiting = "exiting"
        in = "in" # <--- "in" is a reserved keyword
        none = "none"

Reproduction steps

  1. Install version "8.0.1.0"
  2. Import in file: from pyVmomi import vim
  3. Run mypy to check for type hints

Expected behavior

No syntax error detected

Additional context

No response

intgr commented 1 year ago

Also pyVmomi/vim/event/__init__.pyi lines 75 and 155 contain def from(self) -> str: which is invalid syntax. from is a reserved keyword in Python.