[flake8-self] Ignore attribute accesses on instance-like variables (SLF001) (#16149)

This commit is contained in:
InSync 2025-02-23 17:00:49 +07:00 committed by GitHub
parent aa88f2dbe5
commit c814745643
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 243 additions and 134 deletions

View file

@ -572,7 +572,7 @@ pub trait TypeChecker {
/// NOTE: this function doesn't perform more serious type inference, so it won't be able
/// to understand if the value gets initialized from a call to a function always returning
/// lists. This also implies no interfile analysis.
fn check_type<T: TypeChecker>(binding: &Binding, semantic: &SemanticModel) -> bool {
pub fn check_type<T: TypeChecker>(binding: &Binding, semantic: &SemanticModel) -> bool {
match binding.kind {
BindingKind::Assignment => match binding.statement(semantic) {
// Given: