feat: include os.getcwdb (bytes) into flake8-use-pathlib (#2276)

This commit is contained in:
Simon Brugman
2023-01-28 00:25:02 +01:00
committed by GitHub
parent cd8ad1df08
commit 0e27f78b3f
3 changed files with 12 additions and 0 deletions

View File

@@ -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()),

View File

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