Code simplification

This commit is contained in:
David Peter 2025-09-24 17:18:43 +02:00
parent ec3520bbe4
commit 40ffa0c6da

View file

@ -1268,8 +1268,7 @@ impl<'db> Parameters<'db> {
method_type: method,
class_type: class,
}) = method_info
{
if !is_staticmethod
&& !is_staticmethod
&& !is_classmethod
&& arg.parameter.annotation().is_none()
&& parameters.index(arg.name().id()) == Some(0)
@ -1326,17 +1325,6 @@ impl<'db> Parameters<'db> {
},
)
}
} else {
Parameter::from_node_and_kind(
db,
definition,
&arg.parameter,
ParameterKind::PositionalOrKeyword {
name: arg.parameter.name.id.clone(),
default_type: default_type(arg),
},
)
}
});
let variadic = vararg.as_ref().map(|arg| {