Skip to content

Commit

Permalink
Add spacing between @overload'ed functions to fix E302 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry-Lees committed Dec 20, 2024
1 parent a7ee273 commit 4f51694
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions kombu/utils/encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ def default_encoding(file: object = None) -> str:

@overload
def str_to_bytes(s: str) -> bytes: ...


@overload
def str_to_bytes(s: T) -> T: ...


def str_to_bytes(s: Any) -> Any:
"""Convert str to bytes."""
if isinstance(s, str):
Expand All @@ -56,8 +60,12 @@ def str_to_bytes(s: Any) -> Any:

@overload
def bytes_to_str(s: bytes) -> str: ...


@overload
def bytes_to_str(s: T) -> T: ...


def bytes_to_str(s: Any) -> Any:
"""Convert bytes to str."""
if isinstance(s, bytes):
Expand Down

0 comments on commit 4f51694

Please sign in to comment.