2017-10-05 113 views
0

我寫了一個python腳本。我的vimrc包含:如何定製vim-syntastic?

Plug 'vim-syntastic/syntastic' 
let g:syntastic_python_checkers=['pyflakes'] 

,我想打開這種類型的錯誤到警告:

File.py|214 error| local variable 'rank_last_c' is assigned to but never used 

和我的代碼是這樣的:

def run(): 
    ... 
    find(something) 
    ... 
def find(n): 
    ... 

顯然,函數'find(n)'被定義。 但有錯誤這樣的:

File.py|149 error| undefined name 'find' 

我應該怎麼做定製我的syntastic?

+1

你似乎有兩個不同的問題。 – chepner

回答

0

使用flake8,你將能夠很容易地ignore errors

但隨着你的第二個例子,我敢打賭,這件事情在

class MyClass: 
    def run(): 
     find(something) 

    def find(n): 
     ... 

的線,所以你應該得到的錯誤...

+0

但是我運行代碼時沒有錯誤? –

+0

@vize_xpft當然,這取決於你的代碼。 – pacholik