-
-
Notifications
You must be signed in to change notification settings - Fork 8
Sourcery Starbot ⭐ refactored pythoninthegrass/python_template #56
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lines
|
||
|
|
||
| # Exit to cancel project | ||
| sys.exit(1) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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) | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function
|
||
|
|
||
|
|
||
| def test_bake_withspecialchars_and_run_tests(cookies): | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,7 @@ def main(): | |
| parser.add_argument('_', nargs='*') | ||
| args = parser.parse_args() | ||
|
|
||
| print("Arguments: " + str(args._)) | ||
| print(f"Arguments: {str(args._)}") | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function
|
||
| print("Replace this message by putting your code into " | ||
| "{{cookiecutter.project_slug}}.cli.main") | ||
| return 0 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines
24-27refactored with the following changes:use-fstring-for-concatenation)