I am implementing a class which requires the __init__ method to accept some arguments. The only issue is that by implementing it, I lose the code completion capability (at least in Jupyter Notebook, where I do have code completion turned on). Here is an example:
If you type Test(first_ in a new cell, no completion is shown. If you comment out the __init__ method, code completion works fine. Is there any way to fix this behavior?
That’s indeed the current behavior, i.e. overriding the default __init__ signature disables the automatic setting of the __signature__ class attribute that is leveraged by IPython for autocompletion:
That’s a conservative approach that I guess could be improved. Can you open an issue?