Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 20, 2024
1 parent b7dbcb8 commit a7ee273
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions kombu/utils/encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@

import sys
import traceback
from typing import Any, Union, Literal, overload, TypeVar

from typing import Any, Literal, TypeVar, overload

T = TypeVar("T")

#: safe_str takes encoding from this file by default.
#: :func:`set_default_encoding_file` can used to set the
#: default output file.
default_encoding_file: Union[str, None] = None
default_encoding_file: str | None = None


def set_default_encoding_file(file: str) -> None:
Expand Down Expand Up @@ -71,7 +70,7 @@ def from_utf8(s: str, *args: Any, **kwargs: Any) -> str:
return s


def ensure_bytes(s: Union[str, bytes]) -> bytes:
def ensure_bytes(s: str | bytes) -> bytes:
"""Ensure s is bytes, not str."""
if not isinstance(s, bytes):
return str_to_bytes(s)
Expand Down

0 comments on commit a7ee273

Please sign in to comment.