[Python] Flake8 檢查程式碼

Ji-Yang Lin
Apr 29, 2021

--

安裝Flake8

pip install Flake8

到指定路徑資料夾下,執行

flake8

或者直接請它去查看某個資料夾內的檔案

flake8 路徑/

結果

程式碼內部也會有所提醒(藍底線處)

依照他的提示逐一修改所需要調整的地方

錯誤列表 Error code prefix:

E***/W***: pep8 errors and warnings

F***: PyFlakes codes (see below)

C9**: McCabe complexity plugin mccabe

N8**: Naming Conventions plugin pep8-naming

--

--

Ji-Yang Lin
Ji-Yang Lin

Written by Ji-Yang Lin

National Central University Be a positive, creative, productive software engineer!

No responses yet