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

add classname to b018 useless-expression output #433

Merged
merged 2 commits into from
Dec 2, 2023

Conversation

r-downing
Copy link
Contributor

@r-downing r-downing commented Dec 1, 2023

Had another idea for an enhancement to the B018 warning, which might make things clearer, especially for the case of tuples. This adds the AST class name to the output.

test file:
image

before and after:
image

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.

O, very slick. Great idea! Thanks!

@cooperlees cooperlees merged commit 4ca0e6b into PyCQA:main Dec 2, 2023
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.

2 participants