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

Method from

crates/ruff_python_codegen/src/generator.rs:104–114  ·  view source on GitHub ↗
(stylist: &'a Stylist<'a>)

Source from the content-addressed store, hash-verified

102
103impl<'a> From<&'a Stylist<'a>> for Generator<'a> {
104 fn from(stylist: &'a Stylist<'a>) -> Self {
105 Self {
106 indent: stylist.indentation(),
107 line_ending: stylist.line_ending(),
108 mode: Mode::default(),
109 buffer: String::new(),
110 indent_depth: 0,
111 num_newlines: 0,
112 initial: true,
113 }
114 }
115}
116
117impl<'a> Generator<'a> {

Callers

nothing calls this directly

Calls 3

defaultFunction · 0.50
indentationMethod · 0.45
line_endingMethod · 0.45

Tested by

no test coverage detected