The style guide states the rule for tool comments and quoted labels

The tool part of a tool comment stays exactly as it is, and the
explanation after it is prose in STE. A quoted UX label is in code font or
in quotation marks, not in italics.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jean-Pierre MartineauandClaude Opus 5.5 committed 2026-10-06 21:45:47 -04:00
1 parent 1914c19bf3
commit 15c1df20d7
1 file changed
+5 -2
+5 -2
View File
@@ -147,8 +147,11 @@ Use a bend only when it helps the reader. In all other cases, use the STE rule.
- A comment that explains is written in STE sentences. A short comment can be a phrase
("Clamp at both ends.").
- Keep the tool comments exactly as they are: `noqa`, `type: ignore`, `pragma`, `fmt:`,
and the SPDX line.
- Keep the tool part of a tool comment exactly as it is: `noqa: BLE001`,
`type: ignore[attr-defined]`, `pragma: no cover`, `fmt: off`, and the SPDX line. The
explanation after the tool part is prose: write it in STE
(`# noqa: BLE001 - an optional read. Its absence is acceptable.`).
- Write a quoted UX label in code font or in double quotation marks, never in italics.
- Keep the `#:` mark of an attribute comment. Write its text in STE.
- Keep the layout of a diagram, a table, or an example in a comment. Change only its
words.