[VScode] python 파일 저장할 때 black 자동 적용하기

박종선·2023년 1월 1일
0

IDE

목록 보기
1/1
post-thumbnail

1. Visual Studio Code에서 Extension으로 Black 설치

2. 아래 사용 설명을 참고하여 JSON 파일 수정

Command + Shift + P로 해당 파일 찾기: Preferences: Open User Settings (JSON)

다음 내용을 추가 입력
"[python]": {
    ...
    "editor.defaultFormatter": "ms-python.black-formatter",
    "editor.formatOnSave": true
  },

profile
공부한 내용을 정리하는 목적. 내용에 문제가 있으면 언제든지 편하게 지적 부탁드립니다.

0개의 댓글