diff --git a/crates/ruff/resources/test/fixtures/flake8_bugbear/B005.py b/crates/ruff/resources/test/fixtures/flake8_bugbear/B005.py index 2785831146..daafd83ab6 100644 --- a/crates/ruff/resources/test/fixtures/flake8_bugbear/B005.py +++ b/crates/ruff/resources/test/fixtures/flake8_bugbear/B005.py @@ -20,6 +20,8 @@ s.rstrip(r"\n\t ") # warning s.strip("a") # no warning s.strip("あ") # no warning s.strip("ああ") # warning +s.strip("\ufeff") # no warning +s.strip("\u0074\u0065\u0073\u0074") # warning from somewhere import other_type, strip diff --git a/crates/ruff/src/rules/flake8_bugbear/snapshots/ruff__rules__flake8_bugbear__tests__B005_B005.py.snap b/crates/ruff/src/rules/flake8_bugbear/snapshots/ruff__rules__flake8_bugbear__tests__B005_B005.py.snap index 51a582a139..8948445b17 100644 --- a/crates/ruff/src/rules/flake8_bugbear/snapshots/ruff__rules__flake8_bugbear__tests__B005_B005.py.snap +++ b/crates/ruff/src/rules/flake8_bugbear/snapshots/ruff__rules__flake8_bugbear__tests__B005_B005.py.snap @@ -72,4 +72,14 @@ expression: diagnostics column: 13 fix: ~ parent: ~ +- kind: + StripWithMultiCharacters: ~ + location: + row: 24 + column: 0 + end_location: + row: 24 + column: 35 + fix: ~ + parent: ~