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

Method new

crates/ruff_python_codegen/src/generator.rs:118–130  ·  view source on GitHub ↗
(indent: &'a Indentation, line_ending: LineEnding)

Source from the content-addressed store, hash-verified

116
117impl<'a> Generator<'a> {
118 pub const fn new(indent: &'a Indentation, line_ending: LineEnding) -> Self {
119 Self {
120 // Style preferences.
121 indent,
122 line_ending,
123 mode: Mode::Default,
124 // Internal state.
125 buffer: String::new(),
126 indent_depth: 0,
127 num_newlines: 0,
128 initial: true,
129 }
130 }
131
132 /// Sets the mode for code unparsing.
133 #[must_use]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected