|
| 1 | +from __future__ import annotations |
| 2 | + |
1 | 3 | import functools
|
2 | 4 | import inspect
|
3 | 5 | import io
|
|
9 | 11 | import string
|
10 | 12 | import sys
|
11 | 13 | from collections import namedtuple
|
| 14 | +from collections.abc import Callable, Iterable |
12 | 15 | from datetime import datetime, timezone
|
13 |
| -from typing import Any, Callable, Dict, Iterable, List, Optional, Union |
| 16 | +from typing import Any |
14 | 17 |
|
15 | 18 | import pytest
|
16 | 19 |
|
@@ -855,12 +858,12 @@ def test_logger_custom_powertools_formatter_clear_state(stdout, service_name, la
|
855 | 858 | class CustomFormatter(LambdaPowertoolsFormatter):
|
856 | 859 | def __init__(
|
857 | 860 | self,
|
858 |
| - json_serializer: Optional[Callable[[Dict], str]] = None, |
859 |
| - json_deserializer: Optional[Callable[[Union[Dict, str, bool, int, float]], str]] = None, |
860 |
| - json_default: Optional[Callable[[Any], Any]] = None, |
861 |
| - datefmt: Optional[str] = None, |
| 861 | + json_serializer: Callable[[dict], str] | None = None, |
| 862 | + json_deserializer: Callable[[dict, str, bool, int, float], str] | None = None, |
| 863 | + json_default: Callable[[Any], Any] | None = None, |
| 864 | + datefmt: str | None = None, |
862 | 865 | use_datetime_directive: bool = False,
|
863 |
| - log_record_order: Optional[List[str]] = None, |
| 866 | + log_record_order: list[str] | None = None, |
864 | 867 | utc: bool = False,
|
865 | 868 | **kwargs,
|
866 | 869 | ):
|
|
0 commit comments