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

jsons.deserializers.default_primitive   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 6
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A default_primitive_deserializer() 0 11 1
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