Skip to content

Commit e05a3da

Browse files
committed
Break out of positional loop
1 parent 7a8ae1f commit e05a3da

File tree

1 file changed

+5
-0
lines changed
  • crates/red_knot_python_semantic/src

1 file changed

+5
-0
lines changed

crates/red_knot_python_semantic/src/types.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4582,6 +4582,11 @@ impl<'db> GeneralCallableType<'db> {
45824582

45834583
match next_parameter {
45844584
EitherOrBoth::Left(self_parameter) => match self_parameter.kind() {
4585+
ParameterKind::KeywordOnly { .. } | ParameterKind::KeywordVariadic { .. }
4586+
if !other_keywords.is_empty() =>
4587+
{
4588+
break;
4589+
}
45854590
ParameterKind::PositionalOnly { default_type, .. }
45864591
| ParameterKind::PositionalOrKeyword { default_type, .. }
45874592
| ParameterKind::KeywordOnly { default_type, .. } => {

0 commit comments

Comments
 (0)