---
source: crates/ruff_linter/src/rules/pycodestyle/mod.rs
---
E714 [*] Test for object identity should be `is not`
 --> E714.py:2:8
  |
1 | #: E714
2 | if not X is Y:
  |        ^^^^^^
3 |     pass
4 | #: E714
  |
help: Convert to `is not`
  |
1 | #: E714
  - if not X is Y:
2 + if X is not Y:
3 |     pass
  |

E714 [*] Test for object identity should be `is not`
 --> E714.py:5:8
  |
3 |     pass
4 | #: E714
5 | if not X.B is Y:
  |        ^^^^^^^^
6 |     pass
  |
help: Convert to `is not`
  |
4 | #: E714
  - if not X.B is Y:
5 + if X.B is not Y:
6 |     pass
  |

E714 [*] Test for object identity should be `is not`
  --> E714.py:39:13
   |
37 | assert {"x": not foo} in bar
38 | assert [42, not foo] in bar
39 | assert not (re.search(r"^.:\\Users\\[^\\]*\\Downloads\\.*") is None)
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: Convert to `is not`
   |
38 | assert [42, not foo] in bar
   - assert not (re.search(r"^.:\\Users\\[^\\]*\\Downloads\\.*") is None)
39 + assert re.search(r"^.:\\Users\\[^\\]*\\Downloads\\.*") is not None
   |
