Code simplification

This commit is contained in:
David Peter 2025-09-24 17:18:43 +02:00
parent 730eb90e7b
commit b529fe7d4e

View file

@ -1265,8 +1265,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)
@ -1323,17 +1322,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| {