---
source: crates/ruff_linter/src/rules/flake8_bugbear/mod.rs
---
B005.py:4:1: B005 Using `.strip()` with multi-character strings is misleading
  |
2 | s.strip(s)  # no warning
3 | s.strip("we")  # no warning
4 | s.strip(".facebook.com")  # warning
  | ^^^^^^^^^^^^^^^^^^^^^^^^ B005
5 | s.strip("e")  # no warning
6 | s.strip("\n\t ")  # no warning
  |

B005.py:7:1: B005 Using `.strip()` with multi-character strings is misleading
  |
5 | s.strip("e")  # no warning
6 | s.strip("\n\t ")  # no warning
7 | s.strip(r"\n\t ")  # warning
  | ^^^^^^^^^^^^^^^^^ B005
8 | s.lstrip(s)  # no warning
9 | s.lstrip("we")  # no warning
  |

B005.py:10:1: B005 Using `.strip()` with multi-character strings is misleading
   |
 8 | s.lstrip(s)  # no warning
 9 | s.lstrip("we")  # no warning
10 | s.lstrip(".facebook.com")  # warning
   | ^^^^^^^^^^^^^^^^^^^^^^^^^ B005
11 | s.lstrip("e")  # no warning
12 | s.lstrip("\n\t ")  # no warning
   |

B005.py:13:1: B005 Using `.strip()` with multi-character strings is misleading
   |
11 | s.lstrip("e")  # no warning
12 | s.lstrip("\n\t ")  # no warning
13 | s.lstrip(r"\n\t ")  # warning
   | ^^^^^^^^^^^^^^^^^^ B005
14 | s.rstrip(s)  # no warning
15 | s.rstrip("we")  # warning
   |

B005.py:16:1: B005 Using `.strip()` with multi-character strings is misleading
   |
14 | s.rstrip(s)  # no warning
15 | s.rstrip("we")  # warning
16 | s.rstrip(".facebook.com")  # warning
   | ^^^^^^^^^^^^^^^^^^^^^^^^^ B005
17 | s.rstrip("e")  # no warning
18 | s.rstrip("\n\t ")  # no warning
   |

B005.py:19:1: B005 Using `.strip()` with multi-character strings is misleading
   |
17 | s.rstrip("e")  # no warning
18 | s.rstrip("\n\t ")  # no warning
19 | s.rstrip(r"\n\t ")  # warning
   | ^^^^^^^^^^^^^^^^^^ B005
20 | s.strip("a")  # no warning
21 | s.strip("あ")  # no warning
   |

B005.py:22:1: B005 Using `.strip()` with multi-character strings is misleading
   |
20 | s.strip("a")  # no warning
21 | s.strip("あ")  # no warning
22 | s.strip("ああ")  # warning
   | ^^^^^^^^^^^^^^^ B005
23 | s.strip("\ufeff")  # no warning
24 | s.strip("\u0074\u0065\u0073\u0074")  # warning
   |

B005.py:24:1: B005 Using `.strip()` with multi-character strings is misleading
   |
22 | s.strip("ああ")  # warning
23 | s.strip("\ufeff")  # no warning
24 | s.strip("\u0074\u0065\u0073\u0074")  # warning
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ B005
25 | 
26 | from somewhere import other_type, strip
   |


