[red-knot] Fix fully static check for callable type (#16803)

## Summary

This PR fixes a bug in the check for fully static callable type where we
would skip unannotated parameter type.

## Test Plan

Add tests using the new `CallableTypeFromFunction` special form.
This commit is contained in:
Dhruv Manilawala
2025-03-17 20:01:30 +05:30
committed by GitHub
parent 75a562d313
commit 3ccc8dbbf9
2 changed files with 25 additions and 1 deletions

View File

@@ -4579,7 +4579,7 @@ impl<'db> GeneralCallableType<'db> {
if signature.parameters().iter().any(|parameter| {
parameter
.annotated_type()
.is_some_and(|annotated_type| !annotated_type.is_fully_static(db))
.is_none_or(|annotated_type| !annotated_type.is_fully_static(db))
}) {
return false;
}