---
source: crates/ruff_linter/src/rules/pycodestyle/mod.rs
---
E711 [*] Comparison to `None` should be `cond is None`
 --> E711.py:2:11
  |
1 | #: E711
2 | if res == None:
  |           ^^^^
3 |     pass
4 | #: E711
  |
help: Replace with `cond is None`
  |
1 | #: E711
  - if res == None:
2 + if res is None:
3 |     pass
  |
note: This is an unsafe fix and may change runtime behavior

E711 [*] Comparison to `None` should be `cond is not None`
 --> E711.py:5:11
  |
3 |     pass
4 | #: E711
5 | if res != None:
  |           ^^^^
6 |     pass
7 | #: E711
  |
help: Replace with `cond is not None`
  |
4 | #: E711
  - if res != None:
5 + if res is not None:
6 |     pass
  |
note: This is an unsafe fix and may change runtime behavior

E711 [*] Comparison to `None` should be `cond is None`
  --> E711.py:8:4
   |
 6 |     pass
 7 | #: E711
 8 | if None == res:
   |    ^^^^
 9 |     pass
10 | #: E711
   |
help: Replace with `cond is None`
  |
7 | #: E711
  - if None == res:
8 + if None is res:
9 |     pass
  |
note: This is an unsafe fix and may change runtime behavior

E711 [*] Comparison to `None` should be `cond is not None`
  --> E711.py:11:4
   |
 9 |     pass
10 | #: E711
11 | if None != res:
   |    ^^^^
12 |     pass
13 | #: E711
   |
help: Replace with `cond is not None`
   |
10 | #: E711
   - if None != res:
11 + if None is not res:
12 |     pass
   |
note: This is an unsafe fix and may change runtime behavior

E711 [*] Comparison to `None` should be `cond is None`
  --> E711.py:14:14
   |
12 |     pass
13 | #: E711
14 | if res[1] == None:
   |              ^^^^
15 |     pass
16 | #: E711
   |
help: Replace with `cond is None`
   |
13 | #: E711
   - if res[1] == None:
14 + if res[1] is None:
15 |     pass
   |
note: This is an unsafe fix and may change runtime behavior

E711 [*] Comparison to `None` should be `cond is not None`
  --> E711.py:17:14
   |
15 |     pass
16 | #: E711
17 | if res[1] != None:
   |              ^^^^
18 |     pass
19 | #: E711
   |
help: Replace with `cond is not None`
   |
16 | #: E711
   - if res[1] != None:
17 + if res[1] is not None:
18 |     pass
   |
note: This is an unsafe fix and may change runtime behavior

E711 [*] Comparison to `None` should be `cond is not None`
  --> E711.py:20:4
   |
18 |     pass
19 | #: E711
20 | if None != res[1]:
   |    ^^^^
21 |     pass
22 | #: E711
   |
help: Replace with `cond is not None`
   |
19 | #: E711
   - if None != res[1]:
20 + if None is not res[1]:
21 |     pass
   |
note: This is an unsafe fix and may change runtime behavior

E711 [*] Comparison to `None` should be `cond is None`
  --> E711.py:23:4
   |
21 |     pass
22 | #: E711
23 | if None == res[1]:
   |    ^^^^
24 |     pass
   |
help: Replace with `cond is None`
   |
22 | #: E711
   - if None == res[1]:
23 + if None is res[1]:
24 |     pass
   |
note: This is an unsafe fix and may change runtime behavior

E711 [*] Comparison to `None` should be `cond is None`
  --> E711.py:26:9
   |
24 |     pass
25 |
26 | if x == None != None:
   |         ^^^^
27 |     pass
   |
help: Replace with `cond is None`
   |
25 |
   - if x == None != None:
26 + if x is None is not None:
27 |     pass
   |
note: This is an unsafe fix and may change runtime behavior

E711 [*] Comparison to `None` should be `cond is not None`
  --> E711.py:26:17
   |
24 |     pass
25 |
26 | if x == None != None:
   |                 ^^^^
27 |     pass
   |
help: Replace with `cond is not None`
   |
25 |
   - if x == None != None:
26 + if x is None is not None:
27 |     pass
   |
note: This is an unsafe fix and may change runtime behavior
