Completed
Pull Request — master (#694)
by Eric
02:14
created

CustomSerializer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 2
Metric Value
c 2
b 0
f 2
dl 0
loc 6
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A _do_serialize() 0 4 1
1
import os
2
3
from cookiecutter.serialization import JsonSerializer
4
5
6
class CustomSerializer(JsonSerializer):
7
8
    def _do_serialize(self, subject):
9
        subject['template_dir'] = os.path.dirname(os.path.dirname(__file__))
10
11
        return super(CustomSerializer, self)._do_serialize(subject)
12