option to enable lint python codeblocks
Author: DetachHeadCreated Sep 16, 2026Updated Sep 16, 2026
Labelscorelinter
it's great that the formatter now formats python codeblocks in docstrings and markdown files, but i don't like how it just silently leaves blocks unformatted if they contain a syntaax error
it would be nice if ruff reported a syntax error in such docstrings. an option to also report lint rules inside them would be nice too, although it would probably need to be configureable as i can imagine there are some rules users wouldn't care about in codeblocks.
Source: astral-sh/ruff