mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:56 +00:00
[ty] Don't warn yield
not in function when yield
is in function (#18008)
This commit is contained in:
parent
d37592175f
commit
02fd48132c
7 changed files with 87 additions and 17 deletions
|
@ -556,6 +556,10 @@ impl SemanticSyntaxContext for SemanticSyntaxCheckerVisitor<'_> {
|
|||
true
|
||||
}
|
||||
|
||||
fn in_yield_allowed_context(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn in_generator_scope(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue