File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ all releases are available on `PyPI <https://pypi.org/project/pytask>`_ and
21
21
- :gh: `200 ` implements the :func: `@pytask.mark.task <_pytask.task.task> ` decorator to
22
22
mark functions as tasks regardless whether they are prefixed with ``task_ `` or not.
23
23
- :gh: `201 ` adds tests for ``_pytask.mark_utils ``.
24
+ - :gh: `204 ` removes internal traceback frames from exceptions raised somewhere in
25
+ pytask.
24
26
25
27
26
28
0.1.5 - 2022-01-10
Original file line number Diff line number Diff line change 14
14
from _pytask .outcomes import ExitCode
15
15
from _pytask .pluginmanager import get_plugin_manager
16
16
from _pytask .session import Session
17
+ from _pytask .traceback import remove_internal_traceback_frames_from_exc_info
18
+ from rich .traceback import Traceback
17
19
18
20
19
21
if TYPE_CHECKING :
@@ -78,7 +80,10 @@ def main(config_from_cli: Dict[str, Any]) -> Session:
78
80
session .exit_code = ExitCode .FAILED
79
81
80
82
except Exception :
81
- console .print_exception ()
83
+ exc_info = sys .exc_info ()
84
+ exc_info = remove_internal_traceback_frames_from_exc_info (exc_info )
85
+ traceback = Traceback .from_exception (* exc_info )
86
+ console .print (traceback )
82
87
session .exit_code = ExitCode .FAILED
83
88
84
89
session .hook .pytask_unconfigure (session = session )
You can’t perform that action at this time.
0 commit comments