ruff
df807ff9 - Allow `is` and `is` not for direct type comparisons (#7905)

Commit
1 year ago
Allow `is` and `is` not for direct type comparisons (#7905) ## Summary This PR updates our E721 implementation and semantics to match the updated `pycodestyle` logic, which I think is an improvement. Specifically, we now allow `type(obj) is int` for exact type comparisons, which were previously impossible. So now, we're largely just linting against code like `type(obj) == int`. This change is gated to preview mode. Closes https://github.com/astral-sh/ruff/issues/7904. ## Test Plan Updated the test fixture and ensured parity with latest Flake8.
Author
Parents
Loading