MCPcopy
hub / github.com/pallets/werkzeug / showsyntaxerror

Method showsyntaxerror

src/werkzeug/debug/console.py:188–193  ·  view source on GitHub ↗
(self, filename: str | None = None)

Source from the content-addressed store, hash-verified

186 sys.stdout._write(te.render_traceback_html()) # type: ignore
187
188 def showsyntaxerror(self, filename: str | None = None) -> None:
189 from .tbtools import DebugTraceback
190
191 exc = t.cast(BaseException, sys.exc_info()[1])
192 te = DebugTraceback(exc, skip=4)
193 sys.stdout._write(te.render_traceback_html()) # type: ignore
194
195 def write(self, data: str) -> None:
196 sys.stdout.write(data)

Callers

nothing calls this directly

Calls 3

render_traceback_htmlMethod · 0.95
DebugTracebackClass · 0.85
_writeMethod · 0.80

Tested by

no test coverage detected