pycodestyle icon indicating copy to clipboard operation
pycodestyle copied to clipboard

E721 regression(s)

Open asottile opened this issue 3 years ago • 2 comments

so #1041 brought up a lot more instances of E721 and I don't feel confident adding this in a release since it's going to cause a bunch of (imo) unnecessary work

for example, here's something which wasn't flagged before but is now:

assert type(x) is not bytes

strictly speaking the lint rule probably should match this, but almost every case I can find with is and is not is being very explicit about the types being checked

I think the most reasonable thing to do here is to only check == and != -- those are the ones that are most likely actual mistakes rather than an explicit check.

the other option is revert #1041 -- which might be the quickest thing to do to not block a release -- unclear what the best approach is here

asottile avatar Jul 30 '22 18:07 asottile