(
options: PyFormatOptions,
contents: &'a str,
comments: Comments<'a>,
trivia: &'a TriviaRanges,
tokens: &'a Tokens,
)
| 35 | |
| 36 | impl<'a> PyFormatContext<'a> { |
| 37 | pub(crate) fn new( |
| 38 | options: PyFormatOptions, |
| 39 | contents: &'a str, |
| 40 | comments: Comments<'a>, |
| 41 | trivia: &'a TriviaRanges, |
| 42 | tokens: &'a Tokens, |
| 43 | ) -> Self { |
| 44 | Self { |
| 45 | options, |
| 46 | contents, |
| 47 | comments, |
| 48 | trivia, |
| 49 | tokens, |
| 50 | node_level: NodeLevel::TopLevel(TopLevelStatementPosition::Other), |
| 51 | indent_level: IndentLevel::new(0), |
| 52 | docstring: None, |
| 53 | interpolated_string_state: InterpolatedStringState::Outside, |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | pub(crate) fn source(&self) -> &'a str { |
| 58 | self.contents |
nothing calls this directly
no test coverage detected