diff --git a/crates/ruff_python_formatter/tests/snapshots/format@statement__try.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@statement__try.py.snap index 588c6e5b50..eb3717b299 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@statement__try.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@statement__try.py.snap @@ -95,6 +95,16 @@ else: # before finally finally: ... + +# try and try star are statements with body +# Minimized from https://github.com/python/cpython/blob/99b00efd5edfd5b26bf9e2a35cbfc96277fdcbb1/Lib/getpass.py#L68-L91 +try: + try: + pass + finally: + print(1) # issue7208 +except A: + pass ``` ## Output @@ -200,6 +210,16 @@ else: # before finally finally: ... + +# try and try star are statements with body +# Minimized from https://github.com/python/cpython/blob/99b00efd5edfd5b26bf9e2a35cbfc96277fdcbb1/Lib/getpass.py#L68-L91 +try: + try: + pass + finally: + print(1) # issue7208 +except A: + pass ```