8000 Ran pep257 for replay.py by kishan3 · Pull Request #1234 · cookiecutter/cookiecutter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Ran pep257 for replay.py #1234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cookiecutter/replay.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-

"""
cookiecutter.replay
cookiecutter.replay.

-------------------
"""

Expand All @@ -15,11 +16,13 @@


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))

Expand All @@ -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')

Expand Down
0