Coverage for src/configuraptor/loaders/_types.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v7.2.7, created at 2023-11-07 15:36 +0100

1import typing 

2 

3T_config = dict[str, typing.Any] 

4 

5 

6def as_tconfig(data: typing.Any) -> T_config: 

7 """ 

8 Does not actually do anything, but tells mypy the 'data' of type Any (json, pyyaml, tomli) \ 

9 is actually a dict of string keys and Any values. 

10 """ 

11 return typing.cast(T_config, data)