File: //opt/alt/python311/lib/python3.11/site-packages/jsons/__pycache__/_transform_impl.cpython-311.pyc
�
)�;f� � �� � d Z ddlmZmZmZmZmZ ddlmZ ddl m
Z
ddlmZ ddddd�de
d ee d
eeeef geeef f dedee d
eeeef defd�ZdS )zt
PRIVATE MODULE: do not import (from) it directly.
This module contains functionality for loading stuff from json.
� )�Type�List�Any�Dict�Callable)�T)�dump)�loadN)�mapper�dump_cls� dump_args�dump_kwargs�obj�clsr r r
r �returnc �p � |pg }|pi }t | |g|�R i |��} |pd� }
|
| � � }t ||fi |��S )a�
Transform the given ``obj`` to an instance of ``cls``.
:param obj: the object that is to be transformed into a type of ``cls``.
:param cls: the type that ``obj`` is to be transformed into.
:param mapper: a callable that takes the dumped dict and returns a mapped
dict right before it is loaded into ``cls``.
:param dump_cls: the ``cls`` parameter that is given to ``dump``.
:param dump_args: the ``args`` parameter that is given to ``dump``.
:param dump_kwargs: the ``kwargs`` parameter that is given to ``dump``.
:param kwargs: any keyword arguments that are given to ``load``.
:return: an instance of ``cls``.
c � � | S )N� )�xs �H/opt/alt/python311/lib/python3.11/site-packages/jsons/_transform_impl.py�<lambda>ztransform.<locals>.<lambda>&