Add test case for '\u' prefix in B005 (#2976)

Based on #2958.
This commit is contained in:
Artem Mukhin 2023-02-17 01:45:29 +01:00 committed by GitHub
parent 6088a36cd3
commit 4f18fa6733
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View file

@ -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

View file

@ -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: ~