You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bad-str-strip-call (PLE1310) in Ruff 0.9.4 flags a bytes.strip call when its argument is a str, but that is a false positive because bytes.strip does not accept a str argument.
…match, remove custom escape handling logic (`PLE1310`) (#15984)
## Summary
Resolves#15968.
Previously, these would be considered violations:
```python
b''.strip('//')
''.lstrip('//', foo = "bar")
```
...while these are not:
```python
b''.strip(b'//')
''.strip('\\b\\x08')
```
Ruff will now not report when the types of the object and that of the
argument mismatch, or when there are extra arguments.
## Test Plan
`cargo nextest run` and `cargo insta test`.
Description
bad-str-strip-call
(PLE1310) in Ruff 0.9.4 flags abytes.strip
call when its argument is astr
, but that is a false positive becausebytes.strip
does not accept astr
argument.PLE1310 does not flag a
bytes.strip
call when its argument is abytes
, which a false negative.The text was updated successfully, but these errors were encountered: