I use Vim and Jedi to code Python and the autocompletion fails to detect some member objects with the recordclass
and argparse
packages and makes over-eager suggestions.
Consider this case:
from recordclass import recodclass
class Foo(recordclass('Foo', ['bar', 'bar2', 'bar3'])):
def __str__(self):
return 'custom string'
x = Foo()
Now, typing x.
automatically inserts x.__str__
, even if bar
, bar2
, and bar3
are possible options.
A similar thing happens here:
from argparse import ArgumentParser
ap = ArgumentParser()
ap.add_argument('-x', '--some-var', type=str)
args = ap.parse_args()
Now, typing args.
inserts args._
, even if args.some_var
is a valid member.
Can I get Jedi to recognize all members or at least make it not insert the "unambiguous" characters (__str__
and _
) automaticaly?