Loading topic
pyproject.toml. It covers the ways to install Ruff, the two commands you will use every day, and the details of invocation that cause most first-week confusion: whic6 min readpip install ruff. It also assumes you can read Python and a small pyproject.toml. Here you will learn what ruff check does, how to read its output, how its exit codes beh6 min readruff check on a project and read its output, and that you know the basic layout of pyproject.toml. You will learn what a rule code is made of, how prefixes group rules, and how to look up any rule you meet.5 min readruff check and ruff format, read a TOML file, and use a virtual environment. It covers where Ruff looks for settings, how the file is organized, which options matter first, and how to debug a configuration that doesn't behave as expected.5 min readruff check, read a rule code such as F401, and edit a [tool.ruff] section in pyproject.toml. It covers how Ruff decides which rules are active, how to change that set, and the mistakes that most often cause surprises.5 min readruff check and read its output, and that you know rule codes such as F401. It covers what --fix changes, the difference between safe and unsafe fixes, and how to control both in pyproject.toml.6 min readruff format, the formatter built into Ruff. It assumes you can run Ruff from a terminal, read a pyproject.toml file, and already know what ruff check does. Linting is covered in earlier chapters, so this chapter stays on formatting.6 min readnoqa comment tells Ruff to skip a rule at that spot. This chapter covers the comment syntax, where Ruff looks for it, and how to stop suppressions from piling up unnoticed.5 min readruff check, read rule codes such as F401, and edit the [tool.ruff.lint] table in pyproject.toml. If any of those are unfamiliar, review the chapters on rule codes and rule selection first.5 min readruff check and ruff format, and that you can edit [tool.ruff.lint] in pyproject.toml. It covers the I rules, which sort and group imports in the same way as isort. You will see how Ruff classifies each import, how to tune that behavior, and the mistakes tha6 min readruff check and ruff format, read a pyproject.toml, and select rules by code or prefix. It covers what happens when the two tools disagree, which rules cause that, and how to configure and order the tools so they don't fight.6 min readruff check and ruff format by hand. This chapter automates both so that no unchecked code reaches your main branch. Two layers do the work:6 min readruff check and ruff format from the terminal. It also assumes you have a [tool.ruff] section in pyproject.toml, and that you know the difference between safe and unsafe fixes. Here you connect Ruff to your editor so that diagnostics, fixes and formatting happ6 min read