From ce249f5af3e65ac3eb1f5fddddf3607552b62dda Mon Sep 17 00:00:00 2001 From: Chris Pryer Date: Sun, 9 Jul 2023 15:28:17 -0400 Subject: [PATCH] Don't expect trailing comments to trigger format --- .../resources/test/fixtures/ruff/statement/delete.py | 1 + .../tests/snapshots/format@statement__delete.py.snap | 10 +++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/delete.py b/crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/delete.py index 7c8ec8101b8ab..fa5efd652aa27 100644 --- a/crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/delete.py +++ b/crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/delete.py @@ -54,6 +54,7 @@ ) # Completed # Done deleting +# NOTE: This shouldn't format. See https://github.com/astral-sh/ruff/issues/5630. # Delete something del x, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, b, c, d # Delete these # Ready to delete diff --git a/crates/ruff_python_formatter/tests/snapshots/format@statement__delete.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@statement__delete.py.snap index 8fd3462a27c3d..9ccbf27444cc4 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@statement__delete.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@statement__delete.py.snap @@ -60,6 +60,7 @@ del ( ) # Completed # Done deleting +# NOTE: This shouldn't format. See https://github.com/astral-sh/ruff/issues/5630. # Delete something del x, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, b, c, d # Delete these # Ready to delete @@ -194,14 +195,9 @@ del ( ) # Completed # Done deleting +# NOTE: This shouldn't format. See https://github.com/astral-sh/ruff/issues/5630. # Delete something -del ( - x, - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, - b, - c, - d, -) # Delete these +del x, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, b, c, d # Delete these # Ready to delete # Delete something