mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:38:25 +00:00
Allow capitalized names for logger candidate heuristic match (#6356)
Closes https://github.com/astral-sh/ruff/issues/6353.
This commit is contained in:
parent
78a370303b
commit
d788957ec4
3 changed files with 19 additions and 1 deletions
|
@ -49,7 +49,13 @@ pub fn is_logger_candidate(
|
|||
// logger names.
|
||||
if let Some(call_path) = collect_call_path(value) {
|
||||
if let Some(tail) = call_path.last() {
|
||||
if tail.starts_with("log") || tail.ends_with("logger") || tail.ends_with("logging") {
|
||||
if tail.starts_with("log")
|
||||
|| tail.ends_with("logger")
|
||||
|| tail.ends_with("logging")
|
||||
|| tail.starts_with("LOG")
|
||||
|| tail.ends_with("LOGGER")
|
||||
|| tail.ends_with("LOGGING")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue