From 0dbec117da9de70e372de8e2ce9e2276c414a93a Mon Sep 17 00:00:00 2001 From: Chris Pryer Date: Tue, 11 Jul 2023 21:47:57 -0400 Subject: [PATCH] Update ruff fixture --- .../test/fixtures/ruff/statement/assert.py | 37 +++++++++-------- .../format@statement__assert.py.snap | 41 ++++++++++++------- 2 files changed, 47 insertions(+), 31 deletions(-) diff --git a/crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/assert.py b/crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/assert.py index 1dab48dba0db0f..ea786cd7fa4a9f 100644 --- a/crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/assert.py +++ b/crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/assert.py @@ -1,23 +1,28 @@ -assert ( - # Asserted +assert True # Trailing same-line +assert True is True # Trailing same-line +assert 1, "Some string" # Trailing same-line +assert aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa # Trailing same-line + +assert ( # Dangle1 + # Dangle2 ) -# Some assert +# Leading assert assert ( - # Let's go inside - True # Go around this - # Below that -), "Some string" # Outside this way -# Passed all that + # Leading test value + True # Trailing test value same-line + # Trailing test value own-line +), "Some string" # Trailing msg same-line +# Trailing assert -# Dangle this here +# Random dangler -# Some assert +# Leading assert assert ( - # Let's go inside - True # Go around this - # Below that + # Leading test value + True # Trailing test value same-line + # Trailing test value own-line - # Dangle that there -), "Some string" # Outside this way -# Passed all that + # Test dangler +), "Some string" # Trailing msg same-line +# Trailing assert diff --git a/crates/ruff_python_formatter/tests/snapshots/format@statement__assert.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@statement__assert.py.snap index aebfda356bf564..0aa4636687e005 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@statement__assert.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@statement__assert.py.snap @@ -31,28 +31,39 @@ assert ( ## Output ```py +assert True # Trailing same-line +assert True is True # Trailing same-line +assert 1, "Some string" # Trailing same-line assert ( - # Asserted + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +) # Trailing same-line + +assert ( # Dangle1 + # Dangle2 ) -# Some assert +# Leading assert assert ( - # Let's go inside - True # Go around this - # Below that -), "Some string" # Outside this way -# Passed all that + # Leading test value + True # Trailing test value same-line + # Trailing test value own-line +), ( + "Some string" +) # Trailing msg same-line +# Trailing assert -# Dangle this here +# Random dangler -# Some assert +# Leading assert assert ( - # Let's go inside - True # Go around this - # Below that - # Dangle that there -), "Some string" # Outside this way -# Passed all that + # Leading test value + True # Trailing test value same-line + # Trailing test value own-line + # Test dangler +), ( + "Some string" +) # Trailing msg same-line +# Trailing assert ```