mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 06:11:21 +00:00
[pycodestyle
] Make example not raise unnecessary SyntaxError
(E114
) (#19190)
<!-- 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? --> Part of #18972 This PR makes [indentation-with-invalid-multiple-comment (E114)](https://docs.astral.sh/ruff/rules/indentation-with-invalid-multiple-comment/#indentation-with-invalid-multiple-comment-e114)'s example not raise a syntax error by adding a 4 space indented `...`. The example still gave `E114` without this, but adding the `...` both makes the change in indentation of the comment clearer, and makes it not give a `SyntaxError`. ## Test Plan <!-- How was it tested? --> N/A, no functionality/tests affected
This commit is contained in:
parent
36276143be
commit
d78d10dd94
2 changed files with 3 additions and 1 deletions
|
@ -60,12 +60,14 @@ impl Violation for IndentationWithInvalidMultiple {
|
|||
/// ```python
|
||||
/// if True:
|
||||
/// # a = 1
|
||||
/// ...
|
||||
/// ```
|
||||
///
|
||||
/// Use instead:
|
||||
/// ```python
|
||||
/// if True:
|
||||
/// # a = 1
|
||||
/// ...
|
||||
/// ```
|
||||
///
|
||||
/// ## Formatter compatibility
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue