We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
@overload
1 parent 905db0c commit 2a911cdCopy full SHA for 2a911cd
kombu/utils/encoding.py
@@ -45,8 +45,12 @@ def default_encoding(file: object = None) -> str:
45
46
47
def str_to_bytes(s: str) -> bytes: ...
48
+
49
50
51
def str_to_bytes(s: T) -> T: ...
52
53
54
def str_to_bytes(s: Any) -> Any:
55
"""Convert str to bytes."""
56
if isinstance(s, str):
@@ -56,8 +60,12 @@ def str_to_bytes(s: Any) -> Any:
60
57
61
58
62
def bytes_to_str(s: bytes) -> str: ...
63
64
59
65
66
def bytes_to_str(s: T) -> T: ...
67
68
69
def bytes_to_str(s: Any) -> Any:
70
"""Convert bytes to str."""
71
if isinstance(s, bytes):
0 commit comments