mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 18:58:04 +00:00
[pyflakes
] Fix backslash in docs (F621
) (#19098)
<!-- Thank you for contributing to Ruff/ty! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? (Please prefix with `[ty]` for ty pull requests.) - Does this pull request include references to any relevant issues? --> ## Summary <!-- What's the purpose of the change? What does it do, and why? --> 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:  > 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:  > 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 <!-- How was it tested? --> N/A, no tests/functionality affected.
This commit is contained in:
parent
f76d3f87cf
commit
066018859f
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue