Closed IvarVirusiim closed 11 months ago
According to the documentation, the fields in dvs\__init__.pyi PortConnection should be optional (except switchUuid).
dvs\__init__.pyi
PortConnection
switchUuid
https://vdc-repo.vmware.com/vmwb-repository/dcr-public/184bb3ba-6fa8-4574-a767-d0c96e2a38f4/ba9422ef-405c-47dd-8553-e11b619185b2/SDK/vsphere-ws/docs/ReferenceGuide/vim.dvs.PortConnection.html
from pyVmomi import vim port_connection = vim.dvs.PortConnection() port_connection.portKey = None
Run mypy and get Incompatible types in assignment
mypy
Incompatible types in assignment
None should be an accepted value.
None
No response
Duplicate of https://github.com/vmware/pyvmomi/issues/1048
Describe the bug
According to the documentation, the fields in
dvs\__init__.pyi
PortConnection
should be optional (exceptswitchUuid
).https://vdc-repo.vmware.com/vmwb-repository/dcr-public/184bb3ba-6fa8-4574-a767-d0c96e2a38f4/ba9422ef-405c-47dd-8553-e11b619185b2/SDK/vsphere-ws/docs/ReferenceGuide/vim.dvs.PortConnection.html
Reproduction steps
Run
mypy
and getIncompatible types in assignment
Expected behavior
None
should be an accepted value.Additional context
No response