Skip to content

Sourcery Starbot ⭐ refactored pythoninthegrass/python_template#56

Closed
SourceryAI wants to merge 1 commit into
pythoninthegrasses:mainfrom
SourceryAI:main
Closed

Sourcery Starbot ⭐ refactored pythoninthegrass/python_template#56
SourceryAI wants to merge 1 commit into
pythoninthegrasses:mainfrom
SourceryAI:main

Conversation

@SourceryAI

Copy link
Copy Markdown

Thanks for starring sourcery-ai/sourcery ✨ 🌟 ✨

Here's your pull request refactoring your most popular Python repo.

If you want Sourcery to refactor all your Python repos and incoming pull requests install our bot.

Review changes via command line

To manually merge these changes, make sure you're on the main branch, then run:

git fetch https://github.com/sourcery-ai-bot/python_template main
git merge --ff-only FETCH_HEAD
git reset HEAD^

Comment thread ci_dir.py
Comment on lines -24 to +27
rel = "./" + cwd_bn
rel = f"./{cwd_bn}"

# add 'CWD=' prefix to rel
cwd_str = "CWD=" + rel
cwd_str = f"CWD={rel}"

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:

Comment thread hooks/pre_gen_project.py
Comment on lines -10 to +12
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"
)

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:

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:

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants