Skip to content

Conversation

@mimre25
Copy link
Contributor

@mimre25 mimre25 commented Jan 16, 2024

Previous implementation produced false positives.
This fixes those and adds some more tests.

Fixes #451

@cooperlees this fixes the bugs described in the issue - There are some more mutating functions (like a dict.popitem() - ok that was an easy one, but = and *= and += are still left to do) that I won't have time to add today.
That said, this will only cause false negatives, so I figured I'd push this and create the PR so you can release a fix for the FPs.

Previous implementation produced false positives.
This fixes those and adds some more tests.

See PyCQA#451
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.

Sounds good to me and sage way to start hardening it.

Will let a few more eyes see it, and release later today.

Appreciate the prompt action, considering I didn't let you know when I was releasing it. I should do that moving forward too with new contributions like this.

@mimre25
Copy link
Contributor Author

mimre25 commented Jan 16, 2024

No worries, I just had an hour in between things just now and this perfectly filled it 🙂

I will look into a good way to harden it further tomorrow and write up a proposal in an issue then.

@mimre25
Copy link
Contributor Author

mimre25 commented Jan 17, 2024

FYI, I've outlined the proposal on how to harden the rule of B038 further in #454

@cooperlees cooperlees merged commit 546d833 into PyCQA:main Jan 17, 2024
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.

B038 false positive in 24.1.15 + 24.1.16

3 participants