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

Method from_context

crates/ruff_python_formatter/src/string/normalize.rs:24–29  ·  view source on GitHub ↗
(context: &'a PyFormatContext<'src>)

Source from the content-addressed store, hash-verified

22
23impl<'a, 'src> StringNormalizer<'a, 'src> {
24 pub(crate) fn from_context(context: &'a PyFormatContext<'src>) -> Self {
25 Self {
26 preferred_quote_style: None,
27 context,
28 }
29 }
30
31 pub(crate) fn with_preferred_quote_style(mut self, quote_style: QuoteStyle) -> Self {
32 self.preferred_quote_style = Some(quote_style);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected