Skip to content
Commit cbcde7f0 authored by Francis Herne's avatar Francis Herne
Browse files

Completion hint: Correct default-argument index for non-static methods.

BUG: 369369

From the bug:
```
class C:
    def func1(self, arg1, arg2, arg3=None, arg4=42, arg5='default'):
        pass
c = C()
c.func1(
 # argument tooltip says void func1 (arg1, arg2, arg3, [arg4, arg5])
```

Now '(arg1, arg2, [arg3, arg4, arg5])' as expected.

Still wrong in case of calling the method directly from the class:
`C.func1(c,` <- same tooltip, but now the self argument is explicit.

This was broken before too, and would require much more intrusive
 changes to fix because we only have the function declaration currently.

Quick fix for 5.1, I'm making some larger changes for master.
parent c870ddd5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment