]> Sergey Matveev's repositories - dotfiles.git/blob - vim/.vim/pack/stargrave/start/py-pep8/autoload/python/pep8.vim
Move to vim9script
[dotfiles.git] / vim / .vim / pack / stargrave / start / py-pep8 / autoload / python / pep8.vim
1 vim9script
2
3 # PEP8 caller
4 # Maintainer: Sergey Matveev <stargrave@stargrave.org>
5 # License: GNU General Public License version 3 of the License or later
6 #
7 # Call pycodestyle utility and fill quickfix window with its results.
8
9 export def Do()
10     set makeprg=PATH=$PATH\ pycodestyle\ --select=E,W\ %
11     silent make
12     sign unplace *
13     var _id = 1
14     for item in getqflist()
15         execute(":sign place " .. _id .. " name=P8 line=" .. item.lnum ..
16                 " buffer=" .. item.bufnr)
17         _id = _id + 2
18     endfor
19     redraw!
20     copen
21 enddef