mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-12 22:04:07 +00:00
use string representation when dumping variables
This commit is contained in:
@@ -196,7 +196,7 @@ class HTMLLogger(BaseLogger):
|
|||||||
|
|
||||||
def _python_var(self, var: Any) -> str:
|
def _python_var(self, var: Any) -> str:
|
||||||
if CODE_HIGHLIGHT:
|
if CODE_HIGHLIGHT:
|
||||||
fmt = highlight(repr(var), PythonLexer(), HtmlFormatter(nowrap=True))
|
fmt = highlight(str(var), PythonLexer(), HtmlFormatter(nowrap=True))
|
||||||
return f'<div class="highlight"><code class="lang-python">{fmt}</code></div>'
|
return f'<div class="highlight"><code class="lang-python">{fmt}</code></div>'
|
||||||
|
|
||||||
return f'<code class="lang-python">{str(var)}</code>'
|
return f'<code class="lang-python">{str(var)}</code>'
|
||||||
|
|||||||
Reference in New Issue
Block a user