Closed intgr closed 1 year ago
Used with mypy or PyCharm, code like except vim.fault.AlreadyUpgraded: doesn't typecheck correctly and results in errors like
except vim.fault.AlreadyUpgraded:
upgrade_vm.py:61:16: error: Module has no attribute "fault" [attr-defined]
Example code: https://github.com/vmware/pyvmomi-community-samples/blob/7020598713aa440c70816edae89f96a0fe742be8/samples/upgrade_vm.py#LL61C5-L61C5
This is correct working code, no error expected.
No response
Describe the bug
Used with mypy or PyCharm, code like
except vim.fault.AlreadyUpgraded:
doesn't typecheck correctly and results in errors likeExample code: https://github.com/vmware/pyvmomi-community-samples/blob/7020598713aa440c70816edae89f96a0fe742be8/samples/upgrade_vm.py#LL61C5-L61C5
Reproduction steps
Expected behavior
This is correct working code, no error expected.
Additional context
No response