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 B018 check to find useless string declarations #196

Merged
merged 3 commits into from Oct 28, 2021

Conversation

kasium
Copy link
Contributor

@kasium kasium commented Oct 21, 2021

This will find all sorts of useless string declarations in functions and classes.
It will also prevent to use multiline strings as comments

Resolves #195

This will find all sorts of useless string declarations in functions and classes.
It will also prevent to use multiline strings as comments

Resolves PyCQA#195
@cooperlees
Copy link
Collaborator

Sorry - It seems black's --experimental-string-processing has bit again and caused CI to fail here maybe. What ever it is, black is unhappy.

I filed #197 as a follow up so people have an easy way (without readying our CI yaml) to run locally what GitHub Actions will.

README.rst Outdated Show resolved Hide resolved
@kasium
Copy link
Contributor Author

kasium commented Oct 28, 2021

@cooperlees can you please have another look?

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.

LGTM - Nice start. Is it easy to add support for finding stray ints and floats too?

@cooperlees cooperlees merged commit 5ecf5b0 into PyCQA:master Oct 28, 2021
@kasium kasium deleted the issue-195 branch October 28, 2021 17:48
@kasium
Copy link
Contributor Author

kasium commented Oct 28, 2021

I guess so. Let me have a look in the next time!

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.

Check Proposal: Find useless statements
2 participants