However, currently all properties are declared with the @property decorator with no setter. This means mypy doesn't allow writing to these properties.
Causes lots of errors like:
add_disk_to_vm.py:50:5: error: Property "fileOperation" defined in "VirtualDeviceSpec" is read-only [misc]
add_disk_to_vm.py:51:5: error: Property "operation" defined in "VirtualDeviceSpec" is read-only [misc]
add_disk_to_vm.py:52:5: error: Property "device" defined in "VirtualDeviceSpec" is read-only [misc]
Reproduction steps
Manually fixed syntax errors reported in #1015
Installed resulting package with pip
Ran mypy over my codebase
Expected behavior
Writable properties should be known to mypy as writable.
Describe the bug
In many cases, pyvmomi APIs require writing to properties. For example: https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/add_disk_to_vm.py#L47C30-L57
However, currently all properties are declared with the
@property
decorator with no setter. This means mypy doesn't allow writing to these properties.Causes lots of errors like:
Reproduction steps
pip
mypy
over my codebaseExpected behavior
Writable properties should be known to mypy as writable.
Additional context
No response