We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 223f24a commit 404c1daCopy full SHA for 404c1da
crates/ty_python_semantic/src/types.rs
@@ -4221,7 +4221,9 @@ impl<'db> Type<'db> {
4221
/// Returns the inferred return type of `self` if it is a function literal.
4222
fn inferred_return_type(self, db: &'db dyn Db) -> Option<Type<'db>> {
4223
match self {
4224
- Type::FunctionLiteral(function_type) => Some(function_type.inferred_return_type(db)),
+ Type::FunctionLiteral(function_type) if !function_type.file(db).is_stub(db) => {
4225
+ Some(function_type.inferred_return_type(db))
4226
+ }
4227
_ => None,
4228
}
4229
0 commit comments