Pythonで軽めにLinterを設定したい
pip3 install flake8 autopep8
不要な設定もあるかも
{ "python.linting.enabled": true, // 文法チェックを行う "python.linting.pylintEnabled": false, // pylint は使わない "python.linting.pycodestyleEnabled": false, // pep8 は使わない "python.linting.flake8Enabled": true, "python.linting.flake8Args": [ "--ignore=W293, W504, E501", "--max-line-length=160", ], "python.formatting.provider": "autopep8", // 自動整形に autopep8 を使う "python.formatting.autopep8Args": [ // autopep8 の設定 "--ignore=E111, E114, E402, E501" ], "[python]": { "editor.formatOnSave": true, // 保存時に自動整形を行う "editor.formatOnPaste": false, // ペースト時に自動整形を行わない "editor.formatOnType": false, // 入力後に自動整形を行わない }, }
flake8 # 対象ファイルの確認 autopep8 -i {ファイルディレクトリ} # 自動修正