From 4f51694275613416c26fd8f8cdf386f22f2ae2c7 Mon Sep 17 00:00:00 2001 From: Harry Lees Date: Fri, 20 Dec 2024 14:43:18 +0000 Subject: [PATCH] Add spacing between `@overload`'ed functions to fix E302 errors --- kombu/utils/encoding.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kombu/utils/encoding.py b/kombu/utils/encoding.py index 32eb9941..2487e6f5 100644 --- a/kombu/utils/encoding.py +++ b/kombu/utils/encoding.py @@ -45,8 +45,12 @@ else: @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): @@ -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):