We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
There are type stubs for some exception calsses, such as vmodl.MethodFault. These should derive from Python's Exception or BaseException classes.
vmodl.MethodFault
Exception
BaseException
Without that, using the class in an except clause causes mypy errors. For example https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/waitforupdates.py#LL109C36-L109C36
except
try: pc_filter = prop_collector.CreateFilter(filter_spec, True) atexit.register(pc_filter.Destroy) return pc_filter except vmodl.MethodFault as ex: # ^^^^^^^^^^^^^^^^^
Mypy complains:
waitforupdates.py:227:12: error: Exception type must be derived from BaseException [misc]
pip
mypy
Handling exceptions should not cause typechecker errors.
No response
The text was updated successfully, but these errors were encountered:
962c29c
DanielDraganov
No branches or pull requests
Describe the bug
There are type stubs for some exception calsses, such as
vmodl.MethodFault
. These should derive from Python'sException
orBaseException
classes.Without that, using the class in an
except
clause causes mypy errors. For example https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/waitforupdates.py#LL109C36-L109C36Mypy complains:
Reproduction steps
pip
mypy
over my codebaseExpected behavior
Handling exceptions should not cause typechecker errors.
Additional context
No response
The text was updated successfully, but these errors were encountered: