PyDev-Eclipse confuses with async

The PyDev - Eclipse IDE on Windows platform shows a problem while instantiating ResetSignal.
It confuses with the keyword async introduced newly in the Python 3.5 semantics.
It doesn’t create a problem during runtime. But it does create problems in the IDE.

Any idea on how to solve the problem, possibly suppress the flagged error?

Temporary solution to this is to avoid mentioning async using positional arguments,i.e,
reset = ResetSignal(0, 0, True)

async is not in the reserved Python keywords, so you should only get a warning, still not great but better than an error.
Are you using pylint?

It seems pydev is pointing to the wrong version of myhdl or something because the help doesn’t list async as an argument.

The async keyword has been introduced newly in Python 3.5(the version i am using).

https://docs.python.org/3/whatsnew/3.5.html#pep-492-coroutines-with-async-and-await-syntax

I am not aware about PyLint. On checking under Preferences. “Use Pylint?” was unchecked. I tried activating it but it made no difference. The error still shows up.

No. Its pointing to the correct file. I went through the IDE link and checked it.

Ravi,

I installed Python3.5 and added it to my Python Interpreter list in Eclipse.
And I don’t see a warning nor error for the ResetSignal.

Regards,
Josy

Ok, I checked it. The problem is with the Grammar Version. When selecting 3.0 it shows error, when selecting 2.7 the error goes away irrespective of what Interpreter I use (2.7 or 3.5).

So the problem is while parsing the library using Python 3.0 interpreter.

I don’t see to get this …

But I was using

import myhdl
...
Reset = myhdl.ResetSignal( 0, active = 1, async = True)

If I change it to:

from myhdl import ResetSignal
...
Reset = ResetSignal( 0, active = 1, async = True)

I get the error too :disappointed:
I think it is PyDev being too clever here?

Ravi,

I just updated PyDev to 5.0,0.0 http://www.pydev.org/ and the error is gone :grin:

Regards,

Josy

Yep, its gone after the update for me too.

Note: Had to update to Java 8 for the eclipse to open after update.