This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+lang/python/local/py-yapf
Alexandr Skurikhin 4eb83f2079 python-mode: fix py-yapf for yapf >= 0.3.0
yapf >= 0.3.0 now returns 2 if source code was changed.
2015-09-23 23:11:04 -04:00
..
py-yapf.el python-mode: fix py-yapf for yapf >= 0.3.0 2015-09-23 23:11:04 -04:00
README.org Use + instead of ! for layer categories 2015-09-11 00:13:51 -04:00

py-yapf.el

https://travis-ci.org/paetzke/py-yapf.el.svg?branch=master http://melpa.org/packages/py-yapf-badge.svg

Provides commands, which use the external yapf tool to tidy up the current buffer according to Python's PEP8.

$ pip install git+https://github.com/google/yapf.git
$ wget https://raw.githubusercontent.com/paetzke/py-yapf.el/master/py-yapf.el \
       -O /your/path/py-yapf.el

You can also install py-yapf with MELPA:

M-x package-install RET
py-yapf RET

Add the save hook to your ~/.emacs

(add-to-list 'load-path "/your/path/")
(require 'py-yapf)
(add-hook 'python-mode-hook 'py-yapf-enable-on-save)

Now every time you save your Python file yapf will be executed on the current buffer.