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

Method finish

crates/ruff_python_formatter/src/string/docstring.rs:743–746  ·  view source on GitHub ↗

Finish the code example by generating any final actions if applicable. This typically adds an action when the end of a code example coincides with the end of the docstring.

(&mut self, queue: &mut VecDeque<CodeExampleAddAction<'src>>)

Source from the content-addressed store, hash-verified

741 /// This typically adds an action when the end of a code example coincides
742 /// with the end of the docstring.
743 fn finish(&mut self, queue: &mut VecDeque<CodeExampleAddAction<'src>>) {
744 let Some(kind) = self.kind.take() else { return };
745 queue.push_back(CodeExampleAddAction::Format { kind });
746 }
747
748 /// Looks for the start of a code example. If one was found, then the given
749 /// line is kept and added as part of the code example. Otherwise, the line

Callers 8

fmt_fieldsMethod · 0.45
fmt_fieldsMethod · 0.45
fmt_fieldsMethod · 0.45
fmt_fieldsMethod · 0.45
fmt_fieldsMethod · 0.45
fmtMethod · 0.45
add_iterMethod · 0.45
fmtMethod · 0.45

Calls 1

takeMethod · 0.45

Tested by

no test coverage detected