default_uuid_serializer()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 9
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 9
rs 10
c 0
b 0
f 0
cc 1
nop 2
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