---
source: crates/ruff_python_formatter/tests/fixtures.rs
input_file: crates/ruff_python_formatter/resources/test/fixtures/ruff/fmt_on_off/newlines.py
---
## Input
```python
def func():
    pass
# fmt: off
x = 1
# fmt: on


# fmt: off
def func():
    pass
# fmt: on
x = 1


# fmt: off
def func():
    pass
# fmt: on
def func():
    pass


# fmt: off
def func():
    pass
# fmt: off
def func():
    pass


# fmt: on
def func():
    pass
# fmt: on
def func():
    pass
```

## Output
```python
def func():
    pass


# fmt: off
x = 1
# fmt: on


# fmt: off
def func():
    pass
# fmt: on
x = 1


# fmt: off
def func():
    pass
# fmt: on
def func():
    pass


# fmt: off
def func():
    pass
# fmt: off
def func():
    pass


# fmt: on
def func():
    pass


# fmt: on
def func():
    pass
```



