mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 04:45:01 +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
|
@ -859,6 +859,7 @@ mod tests {
|
|||
Rule::TooManyPublicMethods,
|
||||
Rule::TooManyPublicMethods,
|
||||
Rule::UndocumentedWarn,
|
||||
Rule::InvalidGetLoggerArgument,
|
||||
];
|
||||
|
||||
#[allow(clippy::needless_pass_by_value)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue