---
source: crates/ruff_python_formatter/tests/fixtures.rs
input_file: crates/ruff_python_formatter/resources/test/fixtures/ruff/range_formatting/parentheses.py
---
## Input
```python
def needs_parentheses( ) -> bool:
return item.sizing_mode is None and <RANGE_START>item.width_policy == "auto" and item.height_policy == "automatic"<RANGE_END>
def no_longer_needs_parentheses( ) -> bool:
return (
<RANGE_START>item.width_policy == "auto"
and item.height_policy == "automatic"<RANGE_END>
)
def format_range_after_inserted_parens ():
a and item.sizing_mode is None and item.width_policy == "auto" and item.height_policy == "automatic"<RANGE_START>
print("Format this" ) <RANGE_END>
```
## Output
```python
def needs_parentheses( ) -> bool:
return (
item.sizing_mode is None
and item.width_policy == "auto"
and item.height_policy == "automatic"
)
def no_longer_needs_parentheses( ) -> bool:
return item.width_policy == "auto" and item.height_policy == "automatic"
def format_range_after_inserted_parens ():
a and item.sizing_mode is None and item.width_policy == "auto" and item.height_policy == "automatic"
print("Format this")
```