jsons.serializers.default_uuid   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 4
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A default_uuid_serializer() 0 9 1
1
from uuid import UUID
2
3
4
def default_uuid_serializer(obj: UUID, **kwargs) -> str:
5
    """
6
    Serialize the given obj. By default, it is serialized as specified in RFC 4122.
7
    e.g. '12345678-1234-1234-1234-123456789abc'
8
    :param obj: an instance of an uuid.UUID.
9
    :param kwargs: any keyword arguments.
10
    :return: ``obj`` serialized as a string.
11
    """
12
    return str(obj)
13