mirror of
https://github.com/astral-sh/ruff
synced 2026-01-11 08:34:29 -05:00
[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:
@@ -167,6 +167,7 @@ pub const MAGIC_GLOBALS: &[&str] = &[
|
||||
"WindowsError",
|
||||
"__annotations__",
|
||||
"__builtins__",
|
||||
"__cached__",
|
||||
"__file__",
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user