Passed
Pull Request — master (#180)
by
unknown
01:49
created

jsons.serializers.default_literal   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 5
dl 0
loc 7
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A default_literal_serializer() 0 2 1
1
from typing import Literal, Any
2
3
from jsons._dump_impl import dump
4
5
def default_literal_serializer(obj: Any, cls: Literal, **kwargs):
6
    return dump(obj, type(obj), **kwargs)
7