Closed roomrys closed 3 months ago
A minor adjustment was made in the sleap/gui/commands.py
file, specifically within the try_and_skip_if_error
function. The change involved removing the etype=
keyword argument from the traceback.format_exception
call, simplifying the function's parameters. This modification streamlines the error handling process without impacting the functionality or logging behavior, ensuring that exceptions are still managed effectively.
Files | Change Summary |
---|---|
sleap/gui/commands.py |
Removed the etype= keyword argument from traceback.format_exception in the try_and_skip_if_error function. |
In the code where errors creep,
A little change, a tiny leap.
The trace is clear, the log's a breeze,
Simplified paths, oh what a tease!
Hopping high with joy and glee,
Code's now light, as it should be! 🐰✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 74.50%. Comparing base (
7ed1229
) to head (71d60d7
). Report is 35 commits behind head on develop.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
In a downstream branch, we upgrade our EOL
Python 3.7
to a saferPython 3.10
. But,traceback.format_exception
has changed it's first positional argument's name frometype
toexc
in python 3.7 vs 3.10, relatively.This PR instead uses just the positional nature of the exception type argument and does not try to pass it in as a keyword argument (to keep compatibility between both Python 3.7 and 3.10).
By the way, the open skeleton function gave the same warning on both the develop and downstream branch during L533 of
test_OpenSkeleton
: https://github.com/talmolab/sleap/blob/8a8ed575cf597f3319e679ab6b43776fef6b3eba/tests/gui/test_commands.py#L527-L534which seems fine/redundant, but could be something that is avoided with some prepended logic (for another PR).
Types of changes
Does this address any currently open issues?
1841
Outside contributors checklist
Thank you for contributing to SLEAP!
:heart:
Summary by CodeRabbit