This PR resolves a Python 2 only issue where annotation failed for bound method objects whose im_class attribute was None.
The actual object that this failed on was an IPython InteractiveShell.pre_prompt_hook method, but it's possible to create such bound methods using types.MethodType, by omitting the third argument.
This PR resolves a Python 2 only issue where annotation failed for bound method objects whose
im_class
attribute wasNone
.The actual object that this failed on was an IPython
InteractiveShell.pre_prompt_hook
method, but it's possible to create such bound methods usingtypes.MethodType
, by omitting the third argument.