---
source: crates/ruff_python_formatter/tests/fixtures.rs
input_file: crates/ruff_python_formatter/resources/test/fixtures/black/miscellaneous/force_pyi.py
---
## Input

```python
from typing import Union

@bird
def zoo(): ...

class A: ...
@bar
class B:
    def BMethod(self) -> None: ...
    @overload
    def BMethod(self, arg : List[str]) -> None: ...

class C: ...
@hmm
class D: ...
class E: ...

@baz
def foo() -> None:
    ...

class F (A , C): ...
def spam() -> None: ...

@overload
def spam(arg: str) -> str: ...

var  : int = 1

def eggs() -> Union[str, int]: ...
```

## Black Differences

```diff
--- Black
+++ Ruff
@@ -1,32 +1,45 @@
 from typing import Union
 
+
 @bird
 def zoo(): ...
 
+
 class A: ...
 
+
 @bar
 class B:
     def BMethod(self) -> None: ...
     @overload
     def BMethod(self, arg: List[str]) -> None: ...
 
+
 class C: ...
 
+
 @hmm
 class D: ...
 
+
 class E: ...
 
+
 @baz
 def foo() -> None: ...
 
+
 class F(A, C): ...
 
+
 def spam() -> None: ...
+
+
 @overload
 def spam(arg: str) -> str: ...
 
+
 var: int = 1
 
+
 def eggs() -> Union[str, int]: ...
```

## Ruff Output

```python
from typing import Union


@bird
def zoo(): ...


class A: ...


@bar
class B:
    def BMethod(self) -> None: ...
    @overload
    def BMethod(self, arg: List[str]) -> None: ...


class C: ...


@hmm
class D: ...


class E: ...


@baz
def foo() -> None: ...


class F(A, C): ...


def spam() -> None: ...


@overload
def spam(arg: str) -> str: ...


var: int = 1


def eggs() -> Union[str, int]: ...
```

## Black Output

```python
from typing import Union

@bird
def zoo(): ...

class A: ...

@bar
class B:
    def BMethod(self) -> None: ...
    @overload
    def BMethod(self, arg: List[str]) -> None: ...

class C: ...

@hmm
class D: ...

class E: ...

@baz
def foo() -> None: ...

class F(A, C): ...

def spam() -> None: ...
@overload
def spam(arg: str) -> str: ...

var: int = 1

def eggs() -> Union[str, int]: ...
```


