python:: formatter - ruff // black을 대신하는

 

 

 

 

 

 

https://docs.astral.sh/ruff/formatter/

 

The Ruff Formatter - Ruff

The Ruff Formatter The Ruff formatter is an extremely fast Python code formatter designed as a drop-in replacement for Black, available as part of the ruff CLI via ruff format. The Ruff formatter is available as of Ruff v0.1.2. ruff format ruff format is t

docs.astral.sh

 

 

 

 

 

 

 

vscode에서는 확장팩으로 설치하면 되는데

 

# to install
pip install ruff


# to USE
ruff check   # Lint all files in the current directory.
ruff format  # Format all files in the current directory.



# install On Windows.
powershell -c "irm https://astral.sh/ruff/install.ps1 | iex

 

 

 

 

json 설정파일에는 defaultFormatter를 변경해 준다.

 

 

 

_

반응형