From 066018859f29c324f72e5855fa6fe0728b7d6c15 Mon Sep 17 00:00:00 2001 From: GiGaGon <107241144+MeGaGiGaGon@users.noreply.github.com> Date: Wed, 2 Jul 2025 12:00:33 -0700 Subject: [PATCH] [`pyflakes`] Fix backslash in docs (`F621`) (#19098) ## Summary This fixes the docs for [expressions-in-star-assignment (F621)](https://docs.astral.sh/ruff/rules/expressions-in-star-assignment/#expressions-in-star-assignment-f621) having a backslash `\` before the left shifts `<<`. I'm not sure why this happened in the first place, as the docstring looks fine, but putting the `<<` inside a code block fixes it. I was not able to track down the source of the issue either. The only other rule with a `<<` is [missing-whitespace-around-bitwise-or-shift-operator (E227)](https://docs.astral.sh/ruff/rules/missing-whitespace-around-bitwise-or-shift-operator/#missing-whitespace-around-bitwise-or-shift-operator-e227), which already has it in a code block. Old docs page: ![image](https://github.com/user-attachments/assets/993106c6-5d83-4aed-836b-e252f5b64916) > In Python 3, no more than 1 \\<< 8 assignments are allowed before a starred expression, and no more than 1 \\<< 24 expressions are allowed after a starred expression. New docs page: ![image](https://github.com/user-attachments/assets/3b40b35f-f39e-49f1-8b2e-262dda4085b4) > In Python 3, no more than `1 << 8` assignments are allowed before a starred expression, and no more than `1 << 24` expressions are allowed after a starred expression. ## Test Plan N/A, no tests/functionality affected. --- .../src/rules/pyflakes/rules/starred_expressions.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ruff_linter/src/rules/pyflakes/rules/starred_expressions.rs b/crates/ruff_linter/src/rules/pyflakes/rules/starred_expressions.rs index ff1c00c57a..b7566b7311 100644 --- a/crates/ruff_linter/src/rules/pyflakes/rules/starred_expressions.rs +++ b/crates/ruff_linter/src/rules/pyflakes/rules/starred_expressions.rs @@ -11,8 +11,8 @@ use crate::{Violation, checkers::ast::Checker}; /// ## Why is this bad? /// In assignment statements, starred expressions can be used to unpack iterables. /// -/// In Python 3, no more than 1 << 8 assignments are allowed before a starred -/// expression, and no more than 1 << 24 expressions are allowed after a starred +/// In Python 3, no more than `1 << 8` assignments are allowed before a starred +/// expression, and no more than `1 << 24` expressions are allowed after a starred /// expression. /// /// ## References