pep257 docstring update for replay.py
pep257 docstring update for replay.py
# -*- coding: utf-8 -*-
"""
-cookiecutter.replay
+cookiecutter.replay.
+
-------------------
"""
@@ -15,11 +16,13 @@ from .utils import make_sure_path_exists
def get_file_name(replay_dir, template_name):
+ """Get the name of file."""
file_name = '{}.json'.format(template_name)
return os.path.join(replay_dir, file_name)
def dump(replay_dir, template_name, context):
+ """Write json data to file."""
if not make_sure_path_exists(replay_dir):
raise IOError('Unable to create replay dir at {}'.format(replay_dir))
@@ -39,6 +42,7 @@ def dump(replay_dir, template_name, context):
def load(replay_dir, template_name):
+ """Read json data from file."""
if not isinstance(template_name, basestring):
raise TypeError('Template name is required to be of type str')
