본문 바로가기

좋아하는 것_매직IT/96.IT 핫이슈

Ruff - 10-100x 빠른 Python 린터를 소개합니다 (github.com/charliermarsh)

반응형

Ruff - 10-100x 빠른 Python 린터를 소개합니다 

해당 깃허브에서는 아래와 같이 소개하고 있네요..
An extremely fast Python linter, written in Rust.

한마디로, Ruff - 10-100x 빠른 Python 린터라고 머릿속에 넣어두시면 될것 같네요..

설치및 사용은 아래와 같이 하시면 될것 같고요..

Installation and usage

Installation

Available as ruff on PyPI:

pip install ruff

Usage

To run ruff, try any of the following:

ruff path/to/code/to/check.py
ruff path/to/code/
ruff path/to/code/*.py

You can run ruff in --watch mode to automatically re-run on-change:

ruff path/to/code/ --watch

ruff also works with Pre-Commit (requires Cargo on system):

repos:
- repo: https://github.com/charliermarsh/ruff
  rev: v0.0.30
  hooks:
    - id: lint

아래는 주요특징을 정리한 내용이고요.

  • Rust로 작성된 Python 린터
  • flake8, pylint, autoflake에 비해 10배에서 100배 가량 빠름
  • ESLint, TypeScript처럼 캐싱, --fix, --watch 옵션 지원
  • Black과 호환됨

한계

  • 아직 production ready 상태는 아님
  • 린트 규칙이 풍부하지 않음
  • Black 같은 auto-formatting 툴이 널리 사용되며 린트 도구의 중요성은 상대적으로 줄어듦

자세한 사항은 아래 웹페이지를 참고하시면 좋을것 같네요..

오늘의 블로그는 여기까지고요..
항상믿고 봐주셔서 감사합니다. 

728x90
300x250