MCPcopy
hub / github.com/pytest-dev/pytest / _get_pygments_lexer

Method _get_pygments_lexer

src/_pytest/_io/terminalwriter.py:208–214  ·  view source on GitHub ↗
(self, lexer: Literal["python", "diff"])

Source from the content-addressed store, hash-verified

206 self.line(indent + new_line)
207
208 def _get_pygments_lexer(self, lexer: Literal["python", "diff"]) -> Lexer:
209 if lexer == "python":
210 return PythonLexer()
211 elif lexer == "diff":
212 return DiffLexer()
213 else:
214 assert_never(lexer)
215
216 def _get_pygments_formatter(self) -> TerminalFormatter:
217 from _pytest.config.exceptions import UsageError

Callers 1

_highlightMethod · 0.95

Calls 1

assert_neverFunction · 0.85

Tested by

no test coverage detected