---
source: crates/ruff_linter/src/rules/pylint/mod.rs
---
compare_to_empty_string.py:7:13: PLC1901 `x is ""` can be simplified to `not x` as an empty string is falsey
  |
6 | def errors():
7 |     if x is "" or x == "":
  |             ^^ PLC1901
8 |         print("x is an empty string")
  |

compare_to_empty_string.py:7:24: PLC1901 `x == ""` can be simplified to `not x` as an empty string is falsey
  |
6 | def errors():
7 |     if x is "" or x == "":
  |                        ^^ PLC1901
8 |         print("x is an empty string")
  |

compare_to_empty_string.py:10:17: PLC1901 `y is not ""` can be simplified to `y` as an empty string is falsey
   |
 8 |         print("x is an empty string")
 9 | 
10 |     if y is not "" or y != "":
   |                 ^^ PLC1901
11 |         print("y is not an empty string")
   |

compare_to_empty_string.py:10:28: PLC1901 `y != ""` can be simplified to `y` as an empty string is falsey
   |
 8 |         print("x is an empty string")
 9 | 
10 |     if y is not "" or y != "":
   |                            ^^ PLC1901
11 |         print("y is not an empty string")
   |

compare_to_empty_string.py:13:8: PLC1901 `"" != z` can be simplified to `z` as an empty string is falsey
   |
11 |         print("y is not an empty string")
12 | 
13 |     if "" != z:
   |        ^^ PLC1901
14 |         print("z is an empty string")
   |


