summaryrefslogtreecommitdiff
path: root/venv/lib/python3.11/site-packages/litestar/logging/_utils.py
blob: ee67b9f98c4e84987a8d3aed663e0064d4f35fd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from __future__ import annotations

from typing import Any

__all__ = ("resolve_handlers",)


def resolve_handlers(handlers: list[Any]) -> list[Any]:
    """Convert list of string of handlers to the object of respective handler.

    Indexing the list performs the evaluation of the object.

    Args:
        handlers: An instance of 'ConvertingList'

    Returns:
        A list of resolved handlers.

    Notes:
        Due to missing typing in 'typeshed' we cannot type this as ConvertingList for now.
    """
    return [handlers[i] for i in range(len(handlers))]