Passed
Pull Request — master (#17)
by Ramon
50s
created

default_primitive_deserializer()   A

Complexity

Conditions 1

Size

Total Lines 11
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 11
rs 10
c 0
b 0
f 0
cc 1
nop 3
1
from typing import Optional
2
3
4
def default_primitive_deserializer(obj: object,
5
                                   cls: Optional[type] = None,
6
                                   **kwargs) -> object:
7
    """
8
    Deserialize a primitive: it simply returns the given primitive.
9
    :param obj: the value that is to be deserialized.
10
    :param cls: not used.
11
    :param kwargs: not used.
12
    :return: ``obj``.
13
    """
14
    return obj
15