Use SemanticModel in lieu of Checker in more methods (#4568)
This commit is contained in:
@@ -16,7 +16,7 @@ use crate::model::SemanticModel;
|
||||
/// # This is detected to be a logger candidate
|
||||
/// bar.error()
|
||||
/// ```
|
||||
pub fn is_logger_candidate(model: &SemanticModel, func: &Expr) -> bool {
|
||||
pub fn is_logger_candidate(func: &Expr, model: &SemanticModel) -> bool {
|
||||
if let Expr::Attribute(ast::ExprAttribute { value, .. }) = func {
|
||||
let Some(call_path) = (if let Some(call_path) = model.resolve_call_path(value) {
|
||||
if call_path.first().map_or(false, |module| *module == "logging") || call_path.as_slice() == ["flask", "current_app", "logger"] {
|
||||
|
||||
Reference in New Issue
Block a user