Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ all releases are available on `PyPI <https://pypi.org/project/pytask>`_ and
- :gh:`93` fixes the display of parametrized arguments in the console.
- :gh:`94` adds ``--show-locals`` which allows to print local variables in tracebacks.
- :gh:`96` implements a spinner to show the progress during the collection.
- :gh:`99` enables color support for WSL in Windows Terminal and fixes ``show_locals``
in ``collect.py``.


0.0.14 - 2021-03-23
Expand Down
6 changes: 5 additions & 1 deletion src/_pytask/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,11 @@ def pytask_collect_log(session, reports, tasks):

console.print()

console.print(Traceback.from_exception(*report.exc_info, show_locals=True))
console.print(
Traceback.from_exception(
*report.exc_info, show_locals=session.config["show_locals"]
)
)

console.print()

Expand Down
2 changes: 1 addition & 1 deletion src/_pytask/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
_IS_WINDOWS = sys.platform == "win32"


if (_IS_WINDOWS and not _IS_WINDOWS_TERMINAL) or _IS_WSL:
if (_IS_WINDOWS or _IS_WSL) and not _IS_WINDOWS_TERMINAL:
_IS_LEGACY_WINDOWS = True
else:
_IS_LEGACY_WINDOWS = False
Expand Down