0

Is there a way to configure PyDev or hint for code completion when using super()?

For example:

class B(A):
    def __init__(self,):
        super(B, self).__init__()

In this case I don't have access to class A's source code but need to know what parameters to provide in the init call which will also tell me what parameters to require in B. I haven't seen anything about super in the type hinting documentation. I also prefer not to directly use A.__init__() if possible because I believe I remember reading that super() is the correct way to do it.

Anand S Kumar
  • 88,551
  • 18
  • 188
  • 176
Ryan
  • 80
  • 10
  • When you call `__init__()` it should throw an error like `"n positional arguments missing"`. That will show you what `A` needs. Or look at the documentation if it's in a library. – Brobin Jun 26 '15 at 15:08

1 Answers1

0

Humm, that sounds like a shortcoming in the PyDev type inference engine. Please report that at https://sw-brainwy.rhcloud.com/tracker/PyDev (the type inference is one of the current development focuses).

Fabio Zadrozny
  • 24,814
  • 4
  • 66
  • 78