---
source: crates/ruff_python_formatter/tests/fixtures.rs
input_file: crates/ruff_python_formatter/resources/test/fixtures/ruff/stub_files/top_level.pyi
---
## Input
```python
from typing import final


def count1(): ...
def count2(): ...
@final
def count3(): ...
@final
class LockType1: ...

def count4(): ...

class LockType2: ...
class LockType3: ...

@final
class LockType4: ...
```

## Output
```python
from typing import final

def count1(): ...
def count2(): ...
@final
def count3(): ...
@final
class LockType1: ...

def count4(): ...

class LockType2: ...
class LockType3: ...

@final
class LockType4: ...
```



