mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 21:34:57 +00:00
Minor refactoring
This commit is contained in:
parent
4b0d423b57
commit
2b3aec132d
1 changed files with 2 additions and 4 deletions
|
@ -1235,14 +1235,12 @@ impl<'db> Parameters<'db> {
|
|||
{
|
||||
let method_has_self_in_generic_context =
|
||||
method.signature(db).overloads.iter().any(|s| {
|
||||
if let Some(context) = s.generic_context {
|
||||
s.generic_context.is_some_and(|context| {
|
||||
context
|
||||
.variables(db)
|
||||
.iter()
|
||||
.any(|v| v.typevar(db).is_self(db))
|
||||
} else {
|
||||
false
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
if method_has_self_in_generic_context
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue