Search code examples
pythoneclipsepydev

PyDev 7.3.0 warns uselessly about iterable unpacking with Python 3.7


Stop editing just to gain few points of reputations and not helping, thanks

First of all, it does not bother the compilation of my code. The command (base) user@machine:~$ python script.py works perfectly and gives what I expect.
What is bothering is during the edition of the code in Eclipse. While the following line is acceptable and compiled well with Python 3.7 a,b,c = *func_returns_2_things(),func_returns_1_thing().
What Eclipse warns : Encountered "*" at line X, column Y. Was expecting one of: "("..., "{"... #and so on
Of course, I tried this [*func_returns_2_things(),func_returns_1_thing()] but it still warns an error: Expected:].
Besides I shouldn't not say "warns" because warning are mentioned with a yellow triangle, and here this is clearly a red circle with red cross in (if you know what I mean).

What can I do to stop this useless warning in my Eclipse edition ?

Notes: def func_returns_2_things(): return 1,2 ; def func_returns_1_thing(): return 4


Versions
Eclipse IDE for Java Developers
Version: 2019-03 (4.11.0)
Build id: 20190314-1200

PyDev for Eclipse
Version: 7.3.0.201908161924
Build id:org.python.pydev.feature.feature.group
Provider: Fabio Zadrozny

Pydev Mylyn Integration
Version: 0.6.0
Build id:org.python.pydev.mylyn.feature.feature.group
Provider: Fabio Zadrozny


Solution

  • I think that the problem is probably that your project is configured to validate the syntax for a different version of Python.

    i.e.: In the project properties, PyDev - Interpreter/Grammar you probably have an older version of Python selected (either in Grammar version or Additional syntax validation).

    See: https://www.pydev.org/manual_101_project_conf2.html for more details.