Ruff

noun

say it: “RUFF” /ˈrʌf/

A fast tool for Python code that finds likely mistakes, such as an unused import, and rewrites files to one tidy layout.

What is Ruff?

Ruff is a fast tool that checks and tidies Python code. ruff check finds likely mistakes such as unused imports, and ruff format lays out every file in one consistent style.

ruff check .    # gym.py:1:8: F401 [*] `os` imported but unused
ruff format .   # 1 file reformatted

In a sentence

  • “The team runs Ruff before every commit so all the files look alike.”
  • “Ruff flagged two imports the gym script never used.”

Level: Journeyman · More Python terms at this level

Updated