[flake8-logging] Implement LOG002: invalid-get-logger-argument (#7399)

## Summary

This PR implements a new rule for `flake8-logging` plugin that checks
for
`logging.getLogger` calls with either `__file__` or `__cached__` as the
first
argument and generates a suggested fix to use `__name__` instead.

Refer: #7248

## Test Plan

Add test cases and `cargo test`
This commit is contained in:
Dhruv Manilawala 2023-09-16 21:51:30 +05:30 committed by GitHub
parent c907317199
commit 0d1fb823d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 208 additions and 0 deletions

View file

@ -167,6 +167,7 @@ pub const MAGIC_GLOBALS: &[&str] = &[
"WindowsError",
"__annotations__",
"__builtins__",
"__cached__",
"__file__",
];