flake8 error E901

user1724763 picture user1724763 · Apr 5, 2014 · Viewed 7.1k times · Source
flake8 xxx --ignore=E501,E128,E701,E261,E301,E126,E127,E131

xxx.py:1:40: E901 SyntaxError: invalid syntax

Any one has any idea where is the syntax error?

Python==2.6, first line of the file is, no byte order marking :

from __future__ import absolute_import

Works fine in Python 2.7 and 3+ though.

Answer

John Lozano picture John Lozano · Mar 4, 2015

If you add --show-source to the flake8 command it'll point out the error in the output.