jorgenschaefer / elpy

Emacs Python Development Environment
GNU General Public License v3.0
1.9k stars 261 forks source link

Incorrect E999 error: "syntax error" #1150

Open rnikoopour opened 7 years ago

rnikoopour commented 7 years ago

The following block of code is causing an incorrect E999 error to appear:

def partial(func, *args, **kwargs):
    return lambda *lambda_args: func(*args, *lambda_args, **kwargs) # error appears here

def foo(x, y, z):
    return x + y + z

add_two = parital(foo, 2)
add_five = partial(add_two, 3)

print(add_five(10)) # 15
jorgenschaefer commented 7 years ago

Hello, and thanks for the report! These syntax errors are issued by flake8 – are you using the latest version? (M-x elpy-config can tell you) If yes, you should be able to reproduce it with flake8 on the command line. Then, please submit this issue to the flake8 people. :-)

rnikoopour commented 7 years ago

For flake8 my version is 3.3.0.

I'll definitely submit this to them. Do you happen to now if flake8 is Python3 complaint?

valignatev commented 7 years ago

Hi @rnikoopour, I can answer this. Flake8 is supposed to be fully python 3.6 compatible. In my case I'm still using flake 3.2.1 but I'm not getting this syntax error.