from collections.abc import Callable, Generator
from logging import Handler, Logger
from typing import Any, TypeVar

from amqp import promise as promise
from typing_extensions import override

_T = TypeVar("_T")

class NullHandler(Handler):
    @override
    def emit(self, record: Any) -> None: ...

def bytes_to_str(s: bytes | str) -> str: ...
def str_to_bytes(s: str | bytes) -> bytes: ...
def get_logger(logger: Logger | str) -> Logger: ...
def set_cloexec(fd: int, cloexec: bool) -> None: ...
def coro(gen: Callable[..., Generator[_T, Any, Any]]) -> Callable[..., _T]: ...
