Skip to content

Improve B018 to include useless calls#547

Merged
cooperlees merged 3 commits intoPyCQA:mainfrom
kasium:issue-546
Mar 3, 2026
Merged

Improve B018 to include useless calls#547
cooperlees merged 3 commits intoPyCQA:mainfrom
kasium:issue-546

Conversation

@kasium
Copy link
Contributor

@kasium kasium commented Mar 2, 2026

Closes #546

Copy link
Collaborator

@cooperlees cooperlees left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good to me. Can you just add a Change Log entry about this in the README so I don't forget and I'll merge <3

I know I should have CI - I might throw AI at it later today.

tuple(reduce(lambda y: x | y, range(3)))
sorted(reduce(lambda y: x | y, range(3)))
frozenset(reduce(lambda y: x | y, range(3)))
_ = min(range(3), key=lambda y: x * y)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is so B018 does not fire now right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

exactly

@kasium kasium requested a review from cooperlees March 3, 2026 06:32
@cooperlees cooperlees merged commit 4d54ecb into PyCQA:main Mar 3, 2026
6 checks passed
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.

Improve B018 to detect certain function calls

2 participants