[Eric] Autocompletion behaviour

Alex Gerhardt-Bourke agerhbour at hotmail.com
Fri Oct 26 04:40:19 BST 2018


Apologies to harp on this point, but in my opinion autocompletion is one of the vital things for a functional IDE. From a number of reviews I’ve read, the fact that autocomplete doesn’t work out of the box or with some easy configuration is the reason a lot of people put eric down not long after picking it up, without giving it a fair chance. So I would like to demonstrate how eric6 currently functions for me, and what I actually expect.

My setup:
I have a conda virtual-environment called eric6. For the sake of simplicity everything following will be done under this environment. I run eric6 under this environment and run help->Show Versions:
[cid:image001.png at 01D46D1B.C30B0190]

I have the following plugins installed for autocompletion:
                Eric Assistant
                Jedi
                Rope
I also have the QScintilla autocompletion enabled.

Under Preferences->Editor->APIs I have the “Compile APIs automatically” setting enabled, and under Python3 PyQt5 GUI project type I have the Python3.7, QScintilla2, and PyQt5 apis listed. All autocompletion options are enabled.

Under Preferences->Editor->Documentation Viewer I have the documentation viewer enabled with show documentation upon ‘(‘ set.

I now create a new project called “checkEricAutocompletion”. Progr. Language python3, project type PyQt5 GUI.
Present in the project is an __init__.py file. I will use this file to check autocompletion behavior.

[cid:image002.png at 01D46D1D.74701A50]
This behavior is perfect – the autocomplete tool (I don’t know which one) is getting results from the QtCore module.
I import QDate.
[cid:image003.png at 01D46D1D.C3BCB370]
Again the results are good, I am seeing options that exist within QDate – I don’t know why I am seeing two of each though, I assume it is due to having multiple autocomplete plugins enabled. This list filters appropriately:
[cid:image004.png at 01D46D1E.08BDF420]

Here is where things get bad. Tabbing to complete currentDate gives me the following:
[cid:image006.png at 01D46D20.B2FE7A70]
The calltip is correct, but no documentation is available. The code info provider is set to Rope, changing to jedi gives the same non-result.

We can see from the calltip that QDate.currentDate() returns a QDate object, so the “now” variable should have many methods available to it. None of these are displayed when pressing ctrl+space.
[cid:image008.png at 01D46D1E.B6C0EB90]

To make matters worse, methods that do *not* exist for QDate types show as autocompletion options when typing some letters, eg:
[cid:image009.png at 01D46D1E.EA6326C0]
The desired behavior here is that the autocomplete tool knows what type of object the “now” variable is and only shows  methods that exist for that type. Maybe this is harder than it sounds due to the dynamic typing nature of python? Here is another example when looking at a method that *does* belong to QDate types:
[cid:image010.png at 01D46D1F.5B65D0C0]
The problem with showing so many options here is, suppose I ignore this box and continue to code, I will now be shown this calltip: [cid:image013.png at 01D46D20.B2FE7A70]

If instead I just tab without selecting the right option, I will be shown the wrong calltip
[cid:image011.png at 01D46D1F.98C7ED40]

In reality, I should be shown this:
[cid:image017.png at 01D46D20.B2FE7A70]

Is all of this behavior what other users experience when using eric, or is there something wrong with my setup? If no, how can this be improved?

Regards,
Alex.


From: Christos Sevastiadis<mailto:csevast at auth.gr>
Sent: Monday, October 22, 2018 5:57 PM
To: Eric at riverbankcomputing.com<mailto:Eric at riverbankcomputing.com>
Subject: Re: [Eric] Autocompletion behaviour

Alex and Detlev,

It seems that the "Virtual Environment" option should affect not only the Start/Debug action but the Editor's code support functions, such as Autocompletion, Calltips and "Code Documentation", either. For the "Code Documentation" I use the Jedi provider instead of Rope, because Rope fails to show information in many cases of my imported modules. Probably this problem is also connected with the different virtual environments.

Regards
Christos

Christos

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/eric/attachments/20181026/1c1bb261/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4B453BE7EBD0426FA200038CE995C5C3.png
Type: image/png
Size: 14959 bytes
Desc: 4B453BE7EBD0426FA200038CE995C5C3.png
URL: <https://www.riverbankcomputing.com/pipermail/eric/attachments/20181026/1c1bb261/attachment-0011.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2AE014377B3B434C9FF3713B36C77EEB.png
Type: image/png
Size: 10398 bytes
Desc: 2AE014377B3B434C9FF3713B36C77EEB.png
URL: <https://www.riverbankcomputing.com/pipermail/eric/attachments/20181026/1c1bb261/attachment-0012.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: A2DFC05538EF4F6D9DA51A98015040C3.png
Type: image/png
Size: 15874 bytes
Desc: A2DFC05538EF4F6D9DA51A98015040C3.png
URL: <https://www.riverbankcomputing.com/pipermail/eric/attachments/20181026/1c1bb261/attachment-0013.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 7A9A5DCFD03C43328C9A6AE755A54293.png
Type: image/png
Size: 8083 bytes
Desc: 7A9A5DCFD03C43328C9A6AE755A54293.png
URL: <https://www.riverbankcomputing.com/pipermail/eric/attachments/20181026/1c1bb261/attachment-0014.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 699465CB4C0D45BBA432A3B24A34D128.png
Type: image/png
Size: 3264 bytes
Desc: 699465CB4C0D45BBA432A3B24A34D128.png
URL: <https://www.riverbankcomputing.com/pipermail/eric/attachments/20181026/1c1bb261/attachment-0015.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4E89E3B98B234F868795D3D9D5CD1D18.png
Type: image/png
Size: 16751 bytes
Desc: 4E89E3B98B234F868795D3D9D5CD1D18.png
URL: <https://www.riverbankcomputing.com/pipermail/eric/attachments/20181026/1c1bb261/attachment-0016.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 7EEBB6F3F7594AACAC5CFEA1C7F5FC35.png
Type: image/png
Size: 10414 bytes
Desc: 7EEBB6F3F7594AACAC5CFEA1C7F5FC35.png
URL: <https://www.riverbankcomputing.com/pipermail/eric/attachments/20181026/1c1bb261/attachment-0017.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3574317198304C919A782D2A7CF3635B.png
Type: image/png
Size: 10589 bytes
Desc: 3574317198304C919A782D2A7CF3635B.png
URL: <https://www.riverbankcomputing.com/pipermail/eric/attachments/20181026/1c1bb261/attachment-0018.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: A50284CBC72440B090577B0055FD17A5.png
Type: image/png
Size: 30423 bytes
Desc: A50284CBC72440B090577B0055FD17A5.png
URL: <https://www.riverbankcomputing.com/pipermail/eric/attachments/20181026/1c1bb261/attachment-0019.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: EFAF4A764A3544D78BBB081804AA15DC.png
Type: image/png
Size: 172208 bytes
Desc: EFAF4A764A3544D78BBB081804AA15DC.png
URL: <https://www.riverbankcomputing.com/pipermail/eric/attachments/20181026/1c1bb261/attachment-0020.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 59406CB5C13A47D5A0D88045DCEAD2B9.png
Type: image/png
Size: 25529 bytes
Desc: 59406CB5C13A47D5A0D88045DCEAD2B9.png
URL: <https://www.riverbankcomputing.com/pipermail/eric/attachments/20181026/1c1bb261/attachment-0021.png>


More information about the Eric mailing list