MCPcopy Create free account
hub / github.com/astral-sh/ruff / unparse_comp

Method unparse_comp

crates/ruff_python_codegen/src/generator.rs:1433–1448  ·  view source on GitHub ↗
(&mut self, generators: &[Comprehension])

Source from the content-addressed store, hash-verified

1431 }
1432
1433 fn unparse_comp(&mut self, generators: &[Comprehension]) {
1434 for comp in generators {
1435 self.p(if comp.is_async {
1436 " async for "
1437 } else {
1438 " for "
1439 });
1440 self.unparse_expr(&comp.target, precedence::COMPREHENSION_TARGET);
1441 self.p(" in ");
1442 self.unparse_expr(&comp.iter, precedence::COMPREHENSION);
1443 for cond in &comp.ifs {
1444 self.p(" if ");
1445 self.unparse_expr(cond, precedence::COMPREHENSION);
1446 }
1447 }
1448 }
1449
1450 fn unparse_string_literal(&mut self, string_literal: &ast::StringLiteral) {
1451 let ast::StringLiteral { value, flags, .. } = string_literal;

Callers 1

unparse_exprMethod · 0.80

Calls 2

pMethod · 0.80
unparse_exprMethod · 0.45

Tested by

no test coverage detected