mirror of
https://github.com/astral-sh/ruff
synced 2026-01-22 14:00:51 -05:00
feat: include os.getcwdb (bytes) into flake8-use-pathlib (#2276)
This commit is contained in:
@@ -26,6 +26,7 @@ pub fn replaceable_by_pathlib(checker: &mut Checker, expr: &Expr) {
|
||||
["os", "remove"] => Some(PathlibRemove.into()),
|
||||
["os", "unlink"] => Some(PathlibUnlink.into()),
|
||||
["os", "getcwd"] => Some(PathlibGetcwd.into()),
|
||||
["os", "getcwdb"] => Some(PathlibGetcwd.into()),
|
||||
["os", "path", "exists"] => Some(PathlibExists.into()),
|
||||
["os", "path", "expanduser"] => Some(PathlibExpanduser.into()),
|
||||
["os", "path", "isdir"] => Some(PathlibIsDir.into()),
|
||||
|
||||
@@ -252,4 +252,14 @@ expression: diagnostics
|
||||
column: 4
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
PathlibGetcwd: ~
|
||||
location:
|
||||
row: 32
|
||||
column: 0
|
||||
end_location:
|
||||
row: 32
|
||||
column: 10
|
||||
fix: ~
|
||||
parent: ~
|
||||
|
||||
|
||||
Reference in New Issue
Block a user