Skip to content

Comments

[pull] main from hynek:main#13

Merged
pull[bot] merged 1 commit intoMu-L:mainfrom
hynek:main
Jan 5, 2025
Merged

[pull] main from hynek:main#13
pull[bot] merged 1 commit intoMu-L:mainfrom
hynek:main

Conversation

@pull
Copy link

@pull pull bot commented Jan 5, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

* Handle Logger.exception() outside "except" block

Fixes: #634

* Continue fixing

* Try a more radical approach to fix _figure_out_exc_info()

The main problem of the function is that *v* can really be anything
(depending on what the users) do and the annotated return type did not
properly match it (e.g., if *v* was "0", the return value would be "0").

The function now rigorously checks the user input and either returns
the desired result (an exc info tuple) or None.  This makes it easier
and safer to use this function.

* Revert #657

The changes introduced in #657 are no longer needed since
_format_exception() is now only called if _figure_out_exc_info() detects
an actual exception

* Simplify branch condition

* Apply suggestions from code review

Co-authored-by: Hynek Schlawack <hs@ox.cx>

* Add changelog entry

Also remove the entry for the now obsolete #657

---------

Co-authored-by: Hynek Schlawack <hs@ox.cx>
@pull pull bot added the ⤵️ pull label Jan 5, 2025
@pull pull bot merged commit 2f7298a into Mu-L:main Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant