Skip to content

add classname to b018 useless-expression output#433

Merged
cooperlees merged 2 commits intoPyCQA:mainfrom
r-downing:b018-class-names
Dec 2, 2023
Merged

add classname to b018 useless-expression output#433
cooperlees merged 2 commits intoPyCQA:mainfrom
r-downing:b018-class-names

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
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