mirror of https://github.com/astral-sh/ruff
Fix: Recover boolean test flag after visiting subexpressions (#13909)
Co-authored-by: xbrtnik1 <524841@mail.muni.cz>
This commit is contained in:
parent
2b76fa8fa1
commit
abafeb4bee
|
|
@ -1535,7 +1535,6 @@ impl<'a> Visitor<'a> for Checker<'a> {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Step 4: Analysis
|
// Step 4: Analysis
|
||||||
analyze::expression(expr, self);
|
|
||||||
match expr {
|
match expr {
|
||||||
Expr::StringLiteral(string_literal) => {
|
Expr::StringLiteral(string_literal) => {
|
||||||
analyze::string_like(string_literal.into(), self);
|
analyze::string_like(string_literal.into(), self);
|
||||||
|
|
@ -1546,6 +1545,7 @@ impl<'a> Visitor<'a> for Checker<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
self.semantic.flags = flags_snapshot;
|
self.semantic.flags = flags_snapshot;
|
||||||
|
analyze::expression(expr, self);
|
||||||
self.semantic.pop_node();
|
self.semantic.pop_node();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue