Skip to content

Commit 905db0c

Browse files
pre-commit-ci[bot]Nusnus
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 5d4a70b commit 905db0c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

kombu/utils/encoding.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@
99

1010
import sys
1111
import traceback
12-
from typing import Any, Union, Literal, overload, TypeVar
13-
12+
from typing import Any, Literal, TypeVar, overload
1413

1514
T = TypeVar("T")
1615

1716
#: safe_str takes encoding from this file by default.
1817
#: :func:`set_default_encoding_file` can used to set the
1918
#: default output file.
20-
default_encoding_file: Union[str, None] = None
19+
default_encoding_file: str | None = None
2120

2221

2322
def set_default_encoding_file(file: str) -> None:
@@ -71,7 +70,7 @@ def from_utf8(s: str, *args: Any, **kwargs: Any) -> str:
7170
return s
7271

7372

74-
def ensure_bytes(s: Union[str, bytes]) -> bytes:
73+
def ensure_bytes(s: str | bytes) -> bytes:
7574
"""Ensure s is bytes, not str."""
7675
if not isinstance(s, bytes):
7776
return str_to_bytes(s)

0 commit comments

Comments
 (0)