[Python]. VS code Formatter & Linter 셋팅

jongmin-oh·2023년 4월 24일
0

1. Formatter Setting

1-1. 설정창 열기

Ctrl + ,

1-2. format 입력 후 Format On Save 체크

1-3. Default Formatter : ms-Python 선택

1-4. Black 설치


Linter Setting

VS Code 창에서 커맨드 입력

Command + Shift + P

Python: Enable/Disable Linting: 설정이 Enable로 설정되어있는지 확인

Linter 선택

-> flake8
-> pylint

본인의 경우 위 두 가지를 사용함.

선택했을 경우 설치가 안되어있으면 설치문구 등장

설치 완료


Tips

settings.json에 추가하면 좋습니다.

    "python.linting.flake8Args": [
        "--max-line-length=120",
        "--ignore=W291",
    ],

    "python.linting.pylintArgs": [
        "--disable=C0111",
        "--disable=C0114",
        "--disable=C0115",
        "--disable=C0116",
        "--disable=E0611",
    ],
profile
Technical Problem Solver (기술로 문제를 해결하는 사람)

0개의 댓글