mirror of https://github.com/astral-sh/ruff
[ty] Remove now-unnecessary Divergent check (#21935)
## Summary This check is not necessary thanks to https://github.com/astral-sh/ruff/pull/21906.
This commit is contained in:
parent
e2ec2bc306
commit
82a7598aa8
|
|
@ -4659,15 +4659,6 @@ fn asynccontextmanager_return_type<'db>(db: &'db dyn Db, func_ty: Type<'db>) ->
|
||||||
.ok()?
|
.ok()?
|
||||||
.homogeneous_element_type(db);
|
.homogeneous_element_type(db);
|
||||||
|
|
||||||
if yield_ty.is_divergent()
|
|
||||||
|| signature
|
|
||||||
.parameters()
|
|
||||||
.iter()
|
|
||||||
.any(|param| param.annotated_type().is_some_and(|ty| ty.is_divergent()))
|
|
||||||
{
|
|
||||||
return Some(yield_ty);
|
|
||||||
}
|
|
||||||
|
|
||||||
let context_manager =
|
let context_manager =
|
||||||
known_module_symbol(db, KnownModule::Contextlib, "_AsyncGeneratorContextManager")
|
known_module_symbol(db, KnownModule::Contextlib, "_AsyncGeneratorContextManager")
|
||||||
.place
|
.place
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue