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

Method p_if

crates/ruff_python_codegen/src/generator.rs:228–232  ·  view source on GitHub ↗
(&mut self, cond: bool, s: &str)

Source from the content-addressed store, hash-verified

226 }
227
228 fn p_if(&mut self, cond: bool, s: &str) {
229 if cond {
230 self.p(s);
231 }
232 }
233
234 fn p_delim(&mut self, first: &mut bool, s: &str) {
235 self.p_if(!std::mem::take(first), s);

Callers 2

p_delimMethod · 0.80
unparse_parametersMethod · 0.80

Calls 1

pMethod · 0.80

Tested by

no test coverage detected