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

Method docstring

crates/ruff_python_formatter/src/context.rs:98–100  ·  view source on GitHub ↗

Returns a non-None value only if the formatter is running on a code snippet within a docstring. The quote character returned corresponds to the quoting used for the docstring containing the code snippet currently being formatted.

(&self)

Source from the content-addressed store, hash-verified

96 /// The quote character returned corresponds to the quoting used for the
97 /// docstring containing the code snippet currently being formatted.
98 pub(crate) fn docstring(&self) -> Option<Quote> {
99 self.docstring
100 }
101
102 /// Return a new context suitable for formatting code snippets within a
103 /// docstring.

Callers 2

add_oneMethod · 0.45
preferred_quote_styleMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected