how to fix the "W293 blank line contains whitespace"

PChao picture PChao · Jan 26, 2015 · Viewed 9.5k times · Source

my python code produce the following warning message:

(1) \dir\file.py:8:1 W293 blank lines contains whitespace
this comes after commands[0] flake8 XXX

how do you fix the issue?

Answer

Mister Brainley picture Mister Brainley · Jan 28, 2016

Using the same principal from this question, you can use autopep8 to automatically fix these. The syntax is ...

    autopep8 --select=W293 --in-place your_file.py