We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ce0de5c + a40b57c commit 0f33b3bCopy full SHA for 0f33b3b
src/check_jsonschema/utils.py
@@ -4,6 +4,7 @@
4
import os
5
import pathlib
6
import re
7
+import textwrap
8
import traceback
9
import typing as t
10
import urllib.parse
@@ -94,7 +95,7 @@ def filename2path(filename: str) -> pathlib.Path:
94
95
96
def format_shortened_error(err: Exception, *, indent: int = 0) -> str:
97
lines = []
- lines.append(indent * " " + f"{type(err).__name__}: {err}")
98
+ lines.append(textwrap.indent(f"{type(err).__name__}: {err}", indent * " "))
99
if err.__traceback__ is not None:
100
lineno = err.__traceback__.tb_lineno
101
tb_frame = err.__traceback__.tb_frame
0 commit comments