mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-28 23:43:53 +00: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:
parent
c907317199
commit
0d1fb823d6
10 changed files with 208 additions and 0 deletions
|
@ -167,6 +167,7 @@ pub const MAGIC_GLOBALS: &[&str] = &[
|
|||
"WindowsError",
|
||||
"__annotations__",
|
||||
"__builtins__",
|
||||
"__cached__",
|
||||
"__file__",
|
||||
];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue