I cloned the python code formatter from https://github.com/google/yapf. Now in its documentation (readme file), it states
Note that if you intend to use YAPF as a command-line tool rather than as a library, installation is not necessary. YAPF supports being run as a directory by the Python interpreter. If you cloned/unzipped YAPF into DIR, it's possible to run:
$ PYTHONPATH=DIR python DIR/yapf [options] ...
Now I cloned the project into my home directory. And then I made a test.py file to run the code formatter on this. I open my terminal and write,
$ PYTHONPATH=~ python ~/yapf test.py
But this fails and gives me the error message as:
/usr/bin/python: can't find '__main__' module in './yapf'
PS: I had tried this code formatter last week and it ran fine in my terminal. Can somebody please help me here?
0 Answers