Skip to content
Closed
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions ci_dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
cwd_bn = cwd.name

# add './' prefix to cwd_bn
rel = "./" + cwd_bn
rel = f"./{cwd_bn}"

# add 'CWD=' prefix to rel
cwd_str = "CWD=" + rel
cwd_str = f"CWD={rel}"
Comment on lines -24 to +27

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 24-27 refactored with the following changes:


# call git via subprocess to find name of repo
abs = subprocess.check_output(["git", "rev-parse", "--show-toplevel"]).decode("utf-8").strip()
Expand Down
4 changes: 3 additions & 1 deletion hooks/pre_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
module_name = "{{ cookiecutter.project_slug}}"

if not re.match(MODULE_REGEX, module_name):
print("ERROR: The project slug (%s) is not a valid Python module name. Please do not use a - and use _ instead" % module_name)
print(
f"ERROR: The project slug ({module_name}) is not a valid Python module name. Please do not use a - and use _ instead"
)
Comment on lines -10 to +12

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 10-10 refactored with the following changes:


# Exit to cancel project
sys.exit(1)
2 changes: 1 addition & 1 deletion tests/test_bake_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def test_bake_and_run_tests(cookies):
with bake_in_temp_dir(cookies) as result:
assert result.project.isdir()
run_inside_dir("python setup.py test", str(result.project)) == 0
print("test_bake_and_run_tests path", str(result.project))
print("test_bake_and_run_tests path", result.project)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function test_bake_and_run_tests refactored with the following changes:



def test_bake_withspecialchars_and_run_tests(cookies):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def main():
parser.add_argument('_', nargs='*')
args = parser.parse_args()

print("Arguments: " + str(args._))
print(f"Arguments: {str(args._)}")

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function main refactored with the following changes:

print("Replace this message by putting your code into "
"{{cookiecutter.project_slug}}.cli.main")
return 0
Expand Down