Skip to content

Conversation

@ericluoliu
Copy link
Contributor

No description provided.

contributors = set(stdout.splitlines())

# remove strings within contributors that have substring "[bot]"
for name in contributors:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
for name in contributors:
for name in list(contributors):

Otherwise we will change the size of the set during iteration and raise an error.

Copy link
Member

Choose a reason for hiding this comment

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

But probably it is easier to update line 23 to:

contributors = set(x for x in stdout.splitlines() if "[bot]" not in x)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I agree. I think the one-liner works well and looks nicer. Should I make a new commit?

Copy link
Member

Choose a reason for hiding this comment

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

We typically squash PRs into a single commit when merging, so feel free to just push a second commit to the same branch (which will automatically update the PR).

As an aside, I'd probably use name instead of x, and if not name.endswith("[bot]") as I think it's always used as a suffix.

@The-Compiler The-Compiler linked an issue Jun 30, 2021 that may be closed by this pull request
Copy link
Member

@The-Compiler The-Compiler left a comment

Choose a reason for hiding this comment

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

Looks great now, thanks! 🎉 One step closer to the 7.0 release!

@The-Compiler The-Compiler enabled auto-merge (squash) June 30, 2021 13:45
@The-Compiler The-Compiler merged commit 5016375 into pytest-dev:main Jun 30, 2021
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.

Filter [bot] names in release automation

3 participants