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

CustomSerializer._do_serialize()   A

Complexity

Conditions 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
c 1
b 0
f 1
dl 0
loc 4
rs 10
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