Skip to content
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

[pylint] Do not trigger PLR6201 on empty collections #15732

Merged
merged 1 commit into from
Jan 25, 2025

Conversation

JelleZijlstra
Copy link
Contributor

Fixes #15729.

Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+0 -2 violations, +0 -0 fixes in 1 projects; 54 projects unchanged)

zulip/zulip (+0 -2 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --no-fix --output-format concise --preview --select ALL

- tools/lib/provision.py:152:42: PLR6201 Use a set literal when testing for membership
- tools/lib/provision.py:152:87: PLR6201 Use a set literal when testing for membership

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
PLR6201 2 0 2 0 0

@ntBre ntBre added bug Something isn't working fixes Related to suggested fixes for violations labels Jan 24, 2025
Copy link
Collaborator

@dylwil3 dylwil3 left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

I also agree with you that if someone writes 1 in [] it's probably an error, but this isn't the right rule to describe the error...

@dylwil3 dylwil3 changed the title Do not trigger PLR6201 on empty collections [pylint] Do not trigger PLR6201 on empty collections Jan 25, 2025
@dylwil3 dylwil3 added preview Related to preview mode features rule Implementing or modifying a lint rule and removed fixes Related to suggested fixes for violations labels Jan 25, 2025
@dylwil3 dylwil3 merged commit d8c2d20 into astral-sh:main Jan 25, 2025
21 checks passed
@JelleZijlstra JelleZijlstra deleted the plr6201-empty branch January 25, 2025 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working preview Related to preview mode features rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PLR6201 on an empty list
3 participants