I just got the lint C0325: Unnecessary parens after 'not' keyword (superfluous-parens), so I removed the parens it referred to, but thankfully a unit test caught that these are not the same, and the parens are needed (removing them changes the logic!).
I have been able to create a minimal example that I believe reproduces this
In : (NoneisNone) isnot (None==1) # Original, pylint lints with C0325Out: TrueIn : (NoneisNone) isnotNone==1# Recommended by C0325Out: False
Thanks for the report. This is not a duplicate of #5803 (my diff for that doesn't fix this!)
There are numerous operators that aren't working. At a glance, it looks like the implementation of the check confuses is not with not, which have different precedences. That would explain why the operators in the same group as is not produce false positives:
If I understand correctly, the problem isn't so much that not and is not have different precedence (they are different, but no other operator is between them), but that the formatting checker assumes that a not necessarily indicates a unary operator when in fact it can be part of a binary operator expression in the form of is not.