Skip to content

Sourcery Starbot ⭐ refactored nikolaik/docker-python-nodejs - #63

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

SourceryAI wants to merge 1 commit into
nikolaik: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/docker-python-nodejs main
git merge --ff-only FETCH_HEAD
git reset HEAD^

Comment on lines -68 to +72
print("Nothing" if not new_or_updated else "\n".join(version["key"] for version in new_or_updated))
print(
"\n".join(version["key"] for version in new_or_updated)
if new_or_updated
else "Nothing"
)

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 generate_config refactored with the following changes:

Comment thread build_versions/readme.py
Comment on lines -11 to +20
rows = []
for v in versions:
rows.append([f"`{v['key']}`", v["python_canonical"], v["nodejs_canonical"], v["distro"]])

head = f"{' | '.join(headings)}\n{' | '.join(['---' for h in headings])}"
rows = [
[
f"`{v['key']}`",
v["python_canonical"],
v["nodejs_canonical"],
v["distro"],
]
for v in versions
]
head = f"{' | '.join(headings)}\n{' | '.join(['---' for _ in headings])}"

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 update_readme_tags_table refactored with the following changes:

if not data["next"]:
return tags
return tags + _fetch_tags(package, page=page + 1)
return tags + _fetch_tags(package, page=page + 1) if data["next"] else tags

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 _fetch_tags refactored with the following changes:

@nikolaik nikolaik closed this Jun 10, 2023
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